input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testEmptyStringIsNotAValidId ( ) { "<AssertPlaceHolder>" ; } isValidMavenId ( java . lang . String ) { return ( id != null ) && ( org . springframework . roo . project . MavenUtils . MAVEN_ID_REGEX . matcher ( id ) . matches ( ) ) ; } | org . junit . Assert . assertFalse ( org . springframework . roo . project . MavenUtils . isValidMavenId ( "" ) ) |
dropOldSection ( ) { java . lang . String previous = ( "//<sp>GENERATED<sp>PREVIOUS<sp>START\n" + ( "var<sp>noLongerNeeded<sp>:String<sp>=<sp>\'hi\';\n" + "//<sp>GENERATED<sp>PREVIOUS<sp>END\n" ) ) + ( generated ) ; "<AssertPlaceHolder>" ; } merge ( java . lang . String , java . lang . String ) { java . util . Map < ja... | org . junit . Assert . assertEquals ( generated , new com . threerings . presents . tools . GeneratedSourceMerger ( ) . merge ( generated , previous ) ) |
txn_readpromote_promote_abort ( ) { unit . begin ( TxnType . READ_PROMOTE ) ; boolean b = unit . promote ( ) ; "<AssertPlaceHolder>" ; unit . abort ( ) ; unit . end ( ) ; checkClear ( ) ; } promote ( ) { if ( bpTree . getNodeManager ( ) . isWritable ( this . getId ( ) ) ) return false ; boolean promoteInPlace = bpTree ... | org . junit . Assert . assertTrue ( b ) |
testCreateDB ( ) { org . geotools . data . couchdb . client . CouchDBConnection db = client . createDB ( getTestDB ( ) ) ; "<AssertPlaceHolder>" ; db . delete ( ) ; } getTestDB ( ) { return getFixture ( ) . getProperty ( "dbname" ) ; } | org . junit . Assert . assertEquals ( getTestDB ( ) , db . getName ( ) ) |
testHasCloudPushService ( ) { com . eclipsesource . tabris . TabrisClient client = new com . eclipsesource . tabris . internal . TabrisClientImpl ( ) ; com . eclipsesource . tabris . push . CloudPush cloudPush = client . getService ( com . eclipsesource . tabris . push . CloudPush . class ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertNotNull ( cloudPush ) |
testSetMoleculeSet_IAtomContainerSet ( ) { org . openscience . cdk . interfaces . IChemModel chemModel = ( ( org . openscience . cdk . interfaces . IChemModel ) ( newChemObject ( ) ) ) ; org . openscience . cdk . interfaces . IAtomContainerSet crystal = chemModel . getBuilder ( ) . newInstance ( org . openscience . cdk... | org . junit . Assert . assertEquals ( crystal , chemModel . getMoleculeSet ( ) ) |
testGetStaticLabel ( ) { System . out . println ( "getStaticLabel" ) ; kg . apc . jmeter . vizualizers . MergeResultsGui instance = new kg . apc . jmeter . vizualizers . MergeResultsGui ( ) ; java . lang . String expResult = "jp@gc<sp>-<sp>Merge<sp>Results" ; java . lang . String result = instance . getStaticLabel ( ) ... | org . junit . Assert . assertEquals ( expResult , result ) |
pingShouldReturnPong ( ) { java . lang . String answer = controller . ping ( ) ; "<AssertPlaceHolder>" ; } ping ( ) { return "pong" ; } | org . junit . Assert . assertEquals ( "pong" , answer ) |
primBooleanParamShouldHandleNull ( ) { create ( "primBooleanParam" ) . invoke ( mockController , context ) ; verify ( mockController ) . primBooleanParam ( false ) ; "<AssertPlaceHolder>" ; } hasViolations ( ) { return ! ( this . violations . isEmpty ( ) ) ; } | org . junit . Assert . assertFalse ( validation . hasViolations ( ) ) |
getCallID ( ) { final com . rapid7 . client . dcerpc . Header header = unmarshalHeader ( com . rapid7 . client . dcerpc . Test_Header . HEADER_HEX_STRING ) ; "<AssertPlaceHolder>" ; } getCallID ( ) { return callID ; } | org . junit . Assert . assertEquals ( 10 , header . getCallID ( ) ) |
paramClassesMatchObjectAssignableFromExactMatch ( ) { java . util . List < java . lang . Class < ? > > memberClassList = new java . util . ArrayList ( ) ; java . util . List < java . lang . Class < ? > > sigclassList = new java . util . ArrayList ( ) ; memberClassList . add ( java . lang . Object . class ) ; sigclassLi... | org . junit . Assert . assertFalse ( org . adoptopenjdk . jitwatch . util . ParseUtil . paramClassesMatch ( false , memberClassList , sigclassList , true ) ) |
testShutdownInputThrowsRuntimeException ( ) { java . lang . RuntimeException expected = new java . lang . RuntimeException ( ) ; when ( delegate , "shutdownInput" ) . thenThrow ( expected ) ; try { sniffySocket . shutdownInput ( ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception actual ) { "<Assert... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetSocketChannel ( ) { System . out . println ( "getSocketChannel" ) ; java . nio . channels . SocketChannel result = instance . getSocketChannel ( ) ; "<AssertPlaceHolder>" ; } getSocketChannel ( ) { if ( ( isUseKeepAlive ( ) ) && ( ( savedSock ) != null ) ) { return savedSock ; } int port ; try { port = java . la... | org . junit . Assert . assertNotNull ( result ) |
testIsValidWhenDataTypeNameIsNotUnique ( ) { final org . kie . workbench . common . dmn . client . editors . types . common . DataType dataType = mock ( org . kie . workbench . common . dmn . client . editors . types . common . DataType . class ) ; final org . kie . workbench . common . dmn . client . editors . common ... | org . junit . Assert . assertFalse ( isValid ) |
testGetCanWin ( ) { "<AssertPlaceHolder>" ; } getCanWin ( ) { return canWin ; } | org . junit . Assert . assertTrue ( actual . getCanWin ( ) ) |
testVariantAsEnumArray ( ) { org . opcfoundation . ua . core . ServerState [ ] data = new org . opcfoundation . ua . core . ServerState [ ] { org . opcfoundation . ua . core . ServerState . Running , org . opcfoundation . ua . core . ServerState . Running } ; org . opcfoundation . ua . builtintypes . Variant sut = new ... | org . junit . Assert . assertArrayEquals ( data , actual ) |
testCheckArgumentWithFormattedMessageForInlegalArgument ( ) { java . lang . String message = "Argument<sp>is<sp>illegal" ; try { cz . zcu . kiv . jop . util . Preconditions . checkArgument ( cz . zcu . kiv . jop . util . PreconditionsTest . illegalArgument , "%s<sp>is<sp>illegal" , "Argument" ) ; } catch ( java . lang ... | org . junit . Assert . assertEquals ( message , exc . getMessage ( ) ) |
validatePaymentTypeSupportedForProduct_Present ( ) { "<AssertPlaceHolder>" ; org . oscm . validation . PaymentDataValidator . validatePaymentTypeSupportedBySupplier ( customer , product_invoice , invoice ) ; } isPaymentTypeSupportedBySupplier ( org . oscm . domobjects . Organization , org . oscm . domobjects . Organiza... | org . junit . Assert . assertTrue ( org . oscm . validation . PaymentDataValidator . isPaymentTypeSupportedBySupplier ( customer , product_invoice , invoice ) ) |
should_execute_only_group_defined_in_class_level_test_annotation ( ) { org . infinitest . config . InfinitestConfiguration configuration = org . infinitest . config . InfinitestConfiguration . builder ( ) . includedGroups ( "manual" ) . build ( ) ; runner . setTestConfigurationSource ( withConfig ( configuration ) ) ; ... | org . junit . Assert . assertEquals ( 2 , size ( results ) ) |
testMaskingRnn ( ) { int timeSeriesLength = 5 ; int nIn = 5 ; int layerSize = 4 ; int nOut = 2 ; int [ ] minibatchSizes = new int [ ] { 1 , 3 } ; for ( int miniBatchSize : minibatchSizes ) { org . deeplearning4j . nn . conf . MultiLayerConfiguration conf = new org . deeplearning4j . nn . conf . NeuralNetConfiguration .... | org . junit . Assert . assertEquals ( outSubset , outputMaskedSubset ) |
testGetNotExistingHandler ( ) { org . eclipse . rap . fileupload . FileUploadHandler result = handlerStore . getHandler ( "testId" ) ; "<AssertPlaceHolder>" ; } getHandler ( java . lang . String ) { return handlers . get ( token ) ; } | org . junit . Assert . assertNull ( result ) |
testAttributeUtil ( ) { final byte [ ] result = new byte [ ] { 64 , 3 , 4 , 10 , 0 , 0 , 2 } ; final io . netty . buffer . ByteBuf aggregator = io . netty . buffer . Unpooled . buffer ( ) ; org . opendaylight . protocol . bgp . parser . spi . AttributeUtil . formatAttribute ( 64 , 3 , io . netty . buffer . Unpooled . w... | org . junit . Assert . assertArrayEquals ( result , org . opendaylight . protocol . util . ByteArray . getAllBytes ( aggregator ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . workflow . kaleo . model . KaleoAction . class , _dynamicQueryClassLoader ) ; dynamicQuery . set... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testSetScriptToTokenizeWithoutSep ( ) { tokenizerUnderTest . setScriptToTokenize ( net . sourceforge . squirrel_sql . plugins . mysql . tokenizer . MysqlQueryTokenizerTest . storedProcSQLWithoutSep ) ; "<AssertPlaceHolder>" ; } getQueryCount ( ) { if ( ( _queries ) == null ) { return 0 ; } return _queries . size ( ) ; ... | org . junit . Assert . assertEquals ( 1 , tokenizerUnderTest . getQueryCount ( ) ) |
testSecondLevelThreadCommentsCount ( ) { com . liferay . portal . kernel . comment . Discussion discussion = _commentManager . getDiscussion ( _user . getUserId ( ) , _group . getGroupId ( ) , com . liferay . document . library . kernel . model . DLFileEntryConstants . getClassName ( ) , _fileEntry . getFileEntryId ( )... | org . junit . Assert . assertEquals ( 3 , descendantCommentsCount ) |
testCodeGenTypesOnly ( ) { org . apache . cxf . tools . wadlto . jaxrs . JAXRSContainer container = new org . apache . cxf . tools . wadlto . jaxrs . JAXRSContainer ( null ) ; org . apache . cxf . tools . common . ToolContext context = new org . apache . cxf . tools . common . ToolContext ( ) ; context . put ( WadlTool... | org . junit . Assert . assertNotNull ( output . list ( ) ) |
testInsertIntoSelectDate ( ) { java . lang . String tableName = "V_MAX_DATE" ; com . splicemachine . test_dao . TableDAO td = new com . splicemachine . test_dao . TableDAO ( methodWatcher . getOrCreateConnection ( ) ) ; td . drop ( com . splicemachine . derby . impl . sql . catalog . TheSysDummyIT . SCHEMA , tableName ... | org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) ) |
shouldBeRequiredIfAnyAreRequired ( ) { java . util . List < javax . faces . component . UIComponent > components = createComponents ( 3 ) ; given ( ( ( javax . faces . component . EditableValueHolder ) ( components . get ( 2 ) ) ) . isRequired ( ) ) . willReturn ( true ) ; components . add ( 2 , mock ( javax . faces . ... | org . junit . Assert . assertThat ( info . isRequired ( ) , org . hamcrest . Matchers . is ( true ) ) |
buildDownstream_derived_noMake ( ) { java . lang . System . setProperty ( Property . buildDownstream . fullName ( ) , "derived" ) ; com . vackosar . gitflowincrementalbuild . boundary . Configuration configuration = new com . vackosar . gitflowincrementalbuild . boundary . Configuration . Provider ( mavenSessionMock ) ... | org . junit . Assert . assertFalse ( configuration . buildDownstream ) |
testGeoServerStyleDeserialization ( ) { com . thoughtworks . xstream . XStream xstream = new com . thoughtworks . xstream . XStream ( ) ; it . geosolutions . geobatch . xstream . Alias alias = new it . geosolutions . geobatch . xstream . Alias ( ) ; alias . setAliasRegistry ( aliasRegistry ) ; alias . setAliases ( xstr... | org . junit . Assert . assertTrue ( configurationDeserialized ) |
naoDeveEstarSelecionadoCasoNaoTenhaICMSSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS icms = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS ( ) ; "<AssertPlaceHolder>" ; } isSelecionado ( ) { return this . isSeleciona... | org . junit . Assert . assertFalse ( icms . isSelecionado ( ) ) |
testVdmNsTable_Constructor_NoParams ( ) { table = new org . overture . core . npp . VdmSymbolTable ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( table ) |
equals_shouldReturnTrueIfThisOptionalParametersAndRequiredParametersAreEqualToGivenSearchQuery ( ) { org . openmrs . module . webservices . rest . web . resource . api . SearchQuery searchQuery1 = new org . openmrs . module . webservices . rest . web . resource . api . SearchQuery . Builder ( "Enables<sp>to<sp>search<s... | org . junit . Assert . assertTrue ( searchQuery1 . equals ( searchQuery2 ) ) |
mergeWithDouble ( ) { puck . thrifty . datatype . IntegerElement elem = new puck . thrifty . datatype . IntegerElement ( "test" ) ; puck . thrifty . datatype . DoubleElement dElem = new puck . thrifty . datatype . DoubleElement ( "test" ) ; puck . thrifty . datatype . Element mergeElem = elem . merge ( dElem ) ; "<Asse... | org . junit . Assert . assertSame ( dElem , mergeElem ) |
testIsAvailable ( ) { final com . allanbank . mongodb . client . connection . Connection mockConnetion = createMock ( com . allanbank . mongodb . client . connection . Connection . class ) ; expect ( mockConnetion . isAvailable ( ) ) . andReturn ( true ) ; mockConnetion . close ( ) ; expectLastCall ( ) ; replay ( mockC... | org . junit . Assert . assertEquals ( true , conn . isAvailable ( ) ) |
testGetBookSimpleProxy ( ) { java . lang . String address = ( "http://localhost:" + ( org . apache . cxf . systest . jaxrs . JAXRSClientServerResourceCreatedSpringBookTest . PORT ) ) + "/webapp/rest" ; org . apache . cxf . systest . jaxrs . BookStoreSimple bookStore = org . apache . cxf . jaxrs . client . JAXRSClientFa... | org . junit . Assert . assertEquals ( 444L , book . getId ( ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . dynamic . data . mapping . model . DDMStorageLink . class , _dynamicQueryClassLoader ) ; dynamicQuery . s... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
doublePropertyImmutable6 ( ) { byte [ ] input = "{\"x\":2,\"x\":4}" . getBytes ( "UTF-8" ) ; com . dslplatform . json . SkippingTest . SingleImmutable s = dslJson . deserialize ( com . dslplatform . json . SkippingTest . SingleImmutable . class , input , input . length ) ; "<AssertPlaceHolder>" ; } deserialize ( java .... | org . junit . Assert . assertEquals ( 4 , s . x ) |
testGroupAddress ( ) { com . zsmartsystems . zigbee . ZigBeeApsFrame frame = new com . zsmartsystems . zigbee . ZigBeeApsFrame ( ) ; System . out . println ( frame ) ; frame . setGroupAddress ( 1 ) ; "<AssertPlaceHolder>" ; } getGroupAddress ( ) { return groupAddress ; } | org . junit . Assert . assertEquals ( 1 , frame . getGroupAddress ( ) ) |
fakes_accessors_by_name ( ) { com . oneeyedmen . fakir . FakerTest . ClassToBeFaked fake = com . oneeyedmen . fakir . Faker . fakeA ( com . oneeyedmen . fakir . FakerTest . ClassToBeFaked . class ) ; "<AssertPlaceHolder>" ; } name ( ) { return "name" ; } | org . junit . Assert . assertEquals ( "name" , fake . name ( ) ) |
UmlLinkType_NotFromReturnTypeDeclaration ( ) { java . lang . String fromClass = "Domain.Direct.Violating.DeclarationReturnType_GenericType_OneTypeParameter" ; java . lang . String toClass = "Technology.Direct.Dao.ProfileDAO" ; "<AssertPlaceHolder>" ; } isUmlLinkNotDetected ( java . lang . String , java . lang . String ... | org . junit . Assert . assertTrue ( isUmlLinkNotDetected ( fromClass , toClass ) ) |
testCopyAssertionTypeObject ( ) { gov . hhs . fha . nhinc . common . nhinccommon . AssertionType origAssertion = new gov . hhs . fha . nhinc . common . nhinccommon . AssertionType ( ) ; origAssertion . setMessageId ( "1.1" ) ; gov . hhs . fha . nhinc . async . AsyncMessageProcessHelper asyncHelper = createAsyncMessageP... | org . junit . Assert . assertEquals ( "1.1" , copiedAssertion . getMessageId ( ) ) |
testClear ( ) { com . eclipsesource . v8 . utils . V8Map < java . lang . String > map = new com . eclipsesource . v8 . utils . V8Map < java . lang . String > ( ) ; com . eclipsesource . v8 . V8Object v1 = new com . eclipsesource . v8 . V8Object ( v8 ) ; com . eclipsesource . v8 . V8Object v2 = new com . eclipsesource .... | org . junit . Assert . assertEquals ( 0 , map . size ( ) ) |
testFindByIsNot ( ) { java . util . List < org . springframework . data . solr . repository . ProductBean > found = repo . findByNameNot ( org . springframework . data . solr . repository . ITestSolrRepositoryOperations . NAMED_PRODUCT . getName ( ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( 3 , found . size ( ) ) |
shouldBeDoneWhenAllIngredientsAreCooked ( ) { com . manning . siia . kitchen . domain . Product soleProduct = mock ( com . manning . siia . kitchen . domain . Product . class ) ; given ( recipe . isSatisfiedBy ( java . util . Arrays . asList ( soleProduct ) ) ) . willReturn ( true ) ; meal . cook ( soleProduct ) ; "<As... | org . junit . Assert . assertThat ( meal . isDone ( ) , org . hamcrest . Matchers . is ( true ) ) |
testGetActiveEmrClusterIdNoIdSpecifiedAssertErrorWhenClusterDoesNotExist ( ) { org . finra . herd . dao . EmrDao originalEmrDao = emrHelper . getEmrDao ( ) ; org . finra . herd . dao . EmrDao mockEmrDao = mock ( org . finra . herd . dao . EmrDao . class ) ; emrHelper . setEmrDao ( mockEmrDao ) ; try { java . lang . Str... | org . junit . Assert . assertEquals ( java . lang . String . format ( "The<sp>cluster<sp>with<sp>name<sp>\"%s\"<sp>does<sp>not<sp>exist." , emrClusterName ) , e . getMessage ( ) ) |
getUserSecurityName ( ) { java . lang . String user = "cn=vmmtestuser,o=vmm" ; java . lang . String uniqueUserId = "vmmtestuser" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_TDSLDAPTest_URAttrMappingVar1 . c , "getUserSecurityName" , "Checking... | org . junit . Assert . assertEquals ( uniqueUserId , com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_TDSLDAPTest_URAttrMappingVar1 . servlet . getUniqueUserId ( user ) ) |
testWordAfterPositionOutOfBounds ( ) { java . lang . String wordAfter = net . sourceforge . pmd . lang . java . ast . CommentUtil . wordAfter ( "@param<sp>param1<sp>Description" , Integer . MAX_VALUE ) ; "<AssertPlaceHolder>" ; } wordAfter ( java . lang . String , int ) { if ( ( text == null ) || ( position >= ( text .... | org . junit . Assert . assertNull ( wordAfter ) |
testSelectColumnsBaseTable ( ) { org . verdictdb . core . sqlobject . BaseTable base = new org . verdictdb . core . sqlobject . BaseTable ( "myschema" , "mytable" , "t" ) ; org . verdictdb . core . sqlobject . SelectQuery relation = org . verdictdb . core . sqlobject . SelectQuery . create ( java . util . Arrays . < or... | org . junit . Assert . assertEquals ( expected , actual ) |
testOfAndWith ( ) { final java . util . Map < java . lang . String , org . nohope . cassandra . mapservice . columns . CColumn < ? , ? > > expectedColumns = new java . util . HashMap ( ) ; expectedColumns . put ( "xxx" , org . nohope . cassandra . mapservice . columns . CColumn . of ( "xxx" , CoreConverter . TEXT ) ) ;... | org . junit . Assert . assertEquals ( expectedColumns , value . getColumns ( ) ) |
testFileNameWithIncorrectExtension ( ) { com . liferay . source . formatter . SourceFormatterArgs sourceFormatterArgs = new com . liferay . source . formatter . SourceFormatterArgs ( ) ; sourceFormatterArgs . setAutoFix ( false ) ; sourceFormatterArgs . setPrintErrors ( false ) ; sourceFormatterArgs . setThrowException... | org . junit . Assert . assertTrue ( modifiedFileNames . toString ( ) , modifiedFileNames . isEmpty ( ) ) |
test_SingleDirFile ( ) { de . vandermeer . svg2vector . applications . is . Svg2Vector_IS app = new de . vandermeer . svg2vector . applications . is . Svg2Vector_IS ( ) ; java . lang . String [ ] args = org . apache . commons . lang3 . ArrayUtils . addAll ( de . vandermeer . svg2vector . applications . is . Test_Svg2Ve... | org . junit . Assert . assertEquals ( 0 , app . executeApplication ( args ) ) |
getFirst ( ) { com . gs . collections . api . set . ImmutableSet < java . lang . Integer > integers = this . classUnderTest ( ) ; "<AssertPlaceHolder>" ; } getFirst ( ) { return null ; } | org . junit . Assert . assertNull ( integers . getFirst ( ) ) |
testContains ( ) { opennlp . tools . ngram . NGramModel ngramModel = new opennlp . tools . ngram . NGramModel ( ) ; opennlp . tools . util . StringList tokens = new opennlp . tools . util . StringList ( "the" , "bro" , "wn" ) ; ngramModel . add ( tokens ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . Object ) { ... | org . junit . Assert . assertFalse ( ngramModel . contains ( new opennlp . tools . util . StringList ( "the" ) ) ) |
testToShortPrmitveFromShort ( ) { java . lang . Object result = com . orientechnologies . orient . core . metadata . schema . OType . convert ( ( ( short ) ( 10 ) ) , Short . TYPE ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Object , java . lang . Class ) { if ( iValue == null ) return null ; if ( iTargetClass... | org . junit . Assert . assertEquals ( result , ( ( short ) ( 10 ) ) ) |
test ( ) { "<AssertPlaceHolder>" ; } isInitialized ( ) { return ( initTs . get ( ) ) == 0 ? false : true ; } | org . junit . Assert . assertTrue ( extension . isInitialized ( ) ) |
TSDLCallsiteTest ( ) { org . eclipse . tracecompass . ctf . core . tests . trace . IOstructgenTest . createDummyTrace ( org . eclipse . tracecompass . ctf . core . tests . trace . IOstructgenTest . callsiteTSDL ) ; trace = new org . eclipse . tracecompass . ctf . core . trace . CTFTrace ( org . eclipse . tracecompass .... | org . junit . Assert . assertNotNull ( trace ) |
testQueryNoAuthorizations ( ) { authRule . enableAuthorization ( "user" ) ; long count = engineRule . getHistoryService ( ) . createHistoricBatchQuery ( ) . count ( ) ; authRule . disableAuthorization ( ) ; "<AssertPlaceHolder>" ; } disableAuthorization ( ) { processEngineConfiguration . setAuthorizationEnabled ( false... | org . junit . Assert . assertEquals ( 0 , count ) |
querySome ( ) { java . util . List < com . example . OwnerRecord > result = table ( ) . findByName ( "Humberto" ) ; "<AssertPlaceHolder>" ; } findByName ( java . lang . String ) { return query ( "select<sp>*<sp>from<sp>owner<sp>where<sp>name<sp>=<sp>?" , name ) ; } | org . junit . Assert . assertTrue ( ( ( result . size ( ) ) >= 0 ) ) |
subscribe_ObjectNotFoundException_BillingContact ( ) { prepareServiceAccessible ( true ) ; new org . oscm . ui . stubs . FacesContextStub ( Locale . ENGLISH ) ; doThrow ( new org . oscm . ui . dialog . mp . wizards . ObjectNotFoundException ( DomainObjectException . ClassEnum . BILLING_CONTACT , "id" ) ) . when ( subsc... | org . junit . Assert . assertEquals ( null , result ) |
testCoerceToNumber02 ( ) { java . lang . Object result = org . apache . el . lang . ELSupport . coerceToNumber ( ( ( java . lang . Object ) ( null ) ) , int . class ) ; "<AssertPlaceHolder>" ; } coerceToNumber ( java . lang . Number , java . lang . Class ) { if ( ( ( Long . TYPE ) == type ) || ( org . apache . el . lan... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 0 ) , result ) |
testGetIndentation ( ) { java . lang . String expected = "\t" ; java . lang . String actual = it . getIndentation ( ) ; "<AssertPlaceHolder>" ; } getIndentation ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < ( count ) ; i ++ ) { sb . append ( indent ) ; } return sb . ... | org . junit . Assert . assertEquals ( expected , actual ) |
puttingByteToEmptyBufferCausesError ( ) { byte [ ] array = new byte [ 4 ] ; java . nio . ByteBuffer buffer = java . nio . ByteBuffer . wrap ( array ) ; buffer . limit ( 2 ) ; buffer . put ( ( ( byte ) ( 2 ) ) ) . put ( ( ( byte ) ( 3 ) ) ) ; try { buffer . put ( ( ( byte ) ( 5 ) ) ) ; org . junit . Assert . fail ( "Sho... | org . junit . Assert . assertThat ( array [ 2 ] , org . hamcrest . CoreMatchers . is ( ( ( byte ) ( 0 ) ) ) ) |
testConnectionAcquiredInOneAttemptWithTimeoutThresholdMaxSizeReachedConcurrently ( ) { when ( poolAdapter . getConnection ( same ( connectionRequestContext ) ) ) . thenAnswer ( new org . mockito . stubbing . Answer < java . lang . Object > ( ) { @ com . vladmihalcea . flexypool . strategy . Override public java . lang ... | org . junit . Assert . assertSame ( connection , incrementPoolOnTimeoutConnectionAcquiringStrategy . getConnection ( connectionRequestContext ) ) |
createConsumerKeyAuth ( ) { com . t1t . apim . rest . KongConsumer consumer = new com . t1t . apim . rest . KongConsumer ( ) . withUsername ( "someid" ) ; consumer = com . t1t . apim . rest . KongClientIntegrationTest . kongClient . createConsumer ( consumer ) ; com . t1t . apim . rest . KongPluginKeyAuthResponse respo... | org . junit . Assert . assertTrue ( responseList . getData ( ) . get ( 0 ) . getKey ( ) . equals ( response . getKey ( ) ) ) |
supports_creating_inetnum ( ) { when ( update . getAction ( ) ) . thenReturn ( Action . CREATE ) ; when ( update . getType ( ) ) . thenReturn ( ObjectType . INETNUM ) ; "<AssertPlaceHolder>" ; } supports ( net . ripe . db . whois . update . domain . PreparedUpdate ) { return ( update . getAction ( ) . equals ( Action .... | org . junit . Assert . assertThat ( subject . supports ( update ) , org . hamcrest . core . Is . is ( true ) ) |
list_contains_any_java ( ) { boolean vehiclesFiveYearOrOlder = false ; for ( com . levelup . java . collections . ListContainsAny . Vehicle vehicle : vehicles ) { if ( ( ( vehicle . year ) - 5 ) <= 2008 ) { vehiclesFiveYearOrOlder = true ; break ; } } "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( vehiclesFiveYearOrOlder ) |
testFileStatusPipeFile ( ) { org . apache . hadoop . fs . RawLocalFileSystem origFs = new org . apache . hadoop . fs . RawLocalFileSystem ( ) ; org . apache . hadoop . fs . RawLocalFileSystem fs = spy ( origFs ) ; org . apache . hadoop . conf . Configuration conf = mock ( org . apache . hadoop . conf . Configuration . ... | org . junit . Assert . assertTrue ( ( ( ( stats != null ) && ( ( stats . length ) == 1 ) ) && ( ( stats [ 0 ] ) == stat ) ) ) |
readsCustomerByEmail ( ) { com . oreilly . springdata . neo4j . core . EmailAddress email = new com . oreilly . springdata . neo4j . core . EmailAddress ( "alicia@keys.com" ) ; com . oreilly . springdata . neo4j . core . Customer alicia = new com . oreilly . springdata . neo4j . core . Customer ( "Alicia" , "Keys" , em... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( alicia ) ) |
nullSelector_shouldReturnEmptySet ( ) { "<AssertPlaceHolder>" ; } filterNamespaces ( java . lang . String , java . util . Locale ) { if ( ( namespaceSelector == null ) || ( namespaceSelector . isEmpty ( ) ) ) { return java . util . Collections . emptySet ( ) ; } else { java . util . Set < java . lang . String > origina... | org . junit . Assert . assertThat ( matcher . filterNamespaces ( null , null ) , org . hamcrest . CoreMatchers . is ( java . util . Collections . emptySet ( ) ) ) |
testBuildWithDisabledStatusConstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . benefit . Benefit context = new org . lnu . is . domain . benefit . Benefit ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>Benefit<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . i... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
testLocalizeIntArray ( ) { final long [ ] initial = new long [ ] { 532 , 632 , 987421 } ; final net . imglib2 . Point p = new net . imglib2 . Point ( initial ) ; final int [ ] result = new int [ 3 ] ; p . localize ( result ) ; for ( int i = 0 ; i < ( initial . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } getLongPosi... | org . junit . Assert . assertEquals ( p . getLongPosition ( i ) , initial [ i ] ) |
equalsOtherLink ( ) { org . mcsoxford . rss . RSSBase other = new org . mcsoxford . rss . RSSBaseTest . Foo ( ) ; other . setLink ( android . net . Uri . parse ( "http://example.com/other" ) ) ; base . setLink ( android . net . Uri . parse ( "http://example.com/" ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . O... | org . junit . Assert . assertFalse ( base . equals ( other ) ) |
testRoundTripSchemaToJDO ( ) { org . sagebionetworks . repo . model . UserProfile dto = new org . sagebionetworks . repo . model . UserProfile ( ) ; dto . setOwnerId ( "101" ) ; dto . setFirstName ( "foo" ) ; dto . setLastName ( "bar" ) ; dto . setRStudioUrl ( "http://rstudio.com" ) ; dto . setEtag ( "0" ) ; dto . setC... | org . junit . Assert . assertEquals ( dto , dto2 ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . security . wedeploy . auth . model . WeDeployAuthToken . class , _dynamicQueryClassLoader ) ; dy... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testStaticIPScanner ( ) { try ( org . jboss . windup . graph . GraphContext context = factory . create ( true ) ) { java . nio . file . Path inputPath = java . nio . file . Paths . get ( "src/test/resources/staticip" ) ; java . nio . file . Path outputPath = java . nio . file . Paths . get ( org . apache . commons . io... | org . junit . Assert . assertEquals ( expectedIPs . size ( ) , numberFound ) |
testFindElementByName ( ) { java . util . Random random = new java . util . Random ( ) ; org . openqa . selenium . WebElement text = driver . findElement ( org . openqa . selenium . By . name ( "TextField1" ) ) ; int number = ( random . nextInt ( ( ( ( com . sugarcrm . candybean . examples . mobile . AppiumAndroidTest ... | org . junit . Assert . assertEquals ( sumLabel . getText ( ) , java . lang . String . valueOf ( number ) ) |
testArray ( ) { java . lang . Object [ ] o = new java . lang . Object [ ] { "A" , java . lang . Long . valueOf ( 1 ) , java . lang . Long . valueOf ( 2 ) , java . lang . Long . valueOf ( 3 ) , java . lang . Long . valueOf ( 3 ) } ; java . lang . Object [ ] o2 = ( ( java . lang . Object [ ] ) ( org . mapdb . elsa . Elsa... | org . junit . Assert . assertTrue ( org . mapdb . elsa . Arrays . equals ( o , o2 ) ) |
testUpdateBatchMaster ( ) { for ( com . ctrip . xpipe . redis . console . model . RedisTbl redisTbl : redises ) { redisTbl . setMaster ( ( ! ( redisTbl . isMaster ( ) ) ) ) ; } redisDao . updateBatchMaster ( redises ) ; for ( com . ctrip . xpipe . redis . console . model . RedisTbl redisTbl : redises ) { com . ctrip . ... | org . junit . Assert . assertEquals ( redisTbl . isMaster ( ) , byPK . isMaster ( ) ) |
testGetObject ( ) { com . fatwire . gst . foundation . test . MockICS ics = new com . fatwire . gst . foundation . test . MockICS ( ) ; com . fatwire . gst . foundation . controller . action . support . BaseFactory bf = new com . fatwire . gst . foundation . controller . action . support . BaseFactoryTest . ListFactory... | org . junit . Assert . assertNotNull ( foo ) |
flushing ( ) { final int maxBufferedRecords = 100 ; final int maxInFlightBatches = 5 ; final int batchSize = 5 ; final int lingerMs = 100000 ; final int maxRetries = 0 ; final int retryBackoffMs = 0 ; final io . confluent . connect . elasticsearch . bulk . BulkProcessor . BehaviorOnMalformedDoc behaviorOnMalformedDoc =... | org . junit . Assert . assertFalse ( client . expectationsMet ( ) ) |
testSerialization ( ) { org . jfree . chart . renderer . xy . VectorRenderer r1 = new org . jfree . chart . renderer . xy . VectorRenderer ( ) ; org . jfree . chart . renderer . xy . VectorRenderer r2 = ( ( org . jfree . chart . renderer . xy . VectorRenderer ) ( org . jfree . chart . TestUtils . serialised ( r1 ) ) ) ... | org . junit . Assert . assertEquals ( r1 , r2 ) |
testSimpleArrayScript ( ) { com . eclipsesource . v8 . V8Array result = v8 . executeArrayScript ( "foo<sp>=<sp>[1,2,3];<sp>foo;" ) ; "<AssertPlaceHolder>" ; result . close ( ) ; } executeArrayScript ( java . lang . String ) { return executeArrayScript ( script , null , 0 ) ; } | org . junit . Assert . assertNotNull ( result ) |
addsMatchedResourceAtBeginningOfMatchedResourcesList ( ) { java . lang . Object resourceOne = new java . lang . Object ( ) ; java . lang . Object resourceTwo = new java . lang . Object ( ) ; applicationContext . addMatchedResource ( resourceOne ) ; applicationContext . addMatchedResource ( resourceTwo ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( newArrayList ( resourceTwo , resourceOne ) , applicationContext . getMatchedResources ( ) ) |
testPubAck_FromBrokerConnection_SendingClientNotFound ( ) { connectClientAndBroker ( ) ; net . xenqtt . message . PubMessage message = new net . xenqtt . message . PubMessage ( net . xenqtt . message . QoS . AT_LEAST_ONCE , false , "foo" , 123 , new byte [ 1 ] ) ; session . publish ( channelToClient1 , message ) ; veri... | org . junit . Assert . assertEquals ( 1 , message . getMessageId ( ) ) |
testCreateEntry ( ) { org . jbei . ice . storage . model . Account account = org . jbei . ice . lib . AccountCreator . createTestAccount ( "testCreateEntry" , false ) ; long uploadId = creator . createBulkUpload ( account . getEmail ( ) , EntryType . PLASMID ) ; org . jbei . ice . lib . dto . entry . PartData partData ... | org . junit . Assert . assertNotNull ( partData ) |
bioconnected_simpleCycle_limit_5 ( ) { org . openscience . cdk . graph . InitialCycles ic = org . openscience . cdk . graph . InitialCycles . ofBiconnectedComponent ( org . openscience . cdk . graph . InitialCyclesTest . cyclohexane ( ) , 5 ) ; "<AssertPlaceHolder>" ; } numberOfCycles ( ) { return paths . length ; } | org . junit . Assert . assertThat ( ic . numberOfCycles ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
testGetWindowName_Matches_Searched_For_Name ( ) { when ( element . getName ( ) ) . thenReturn ( "Name-01" ) ; when ( window . isModal ( ) ) . thenReturn ( true ) ; mmarquee . automation . uiautomation . IUIAutomation mocked_automation = org . mockito . Mockito . mock ( mmarquee . automation . uiautomation . IUIAutomati... | org . junit . Assert . assertEquals ( "Name-01" , windw . getName ( ) ) |
shouldAllowNullValuesIfValid ( ) { java . util . List < java . lang . Integer > testList = com . google . common . collect . Lists . newArrayList ( 1 , null , 5 , 4 , 8 ) ; uk . gov . gchq . gaffer . store . operation . handler . join . match . KeyFunctionMatch match = new uk . gov . gchq . gaffer . store . operation .... | org . junit . Assert . assertEquals ( expected , match . matching ( null ) ) |
testNullSafeNullComparison ( ) { java . lang . String str = "import<sp>org.drools.compiler.*;\n" + ( ( ( "rule<sp>R1<sp>when\n" + "<sp>Person(<sp>address!.street<sp>==<sp>null<sp>)<sp>\n" ) + "then\n" ) + "end" ) ; org . kie . api . KieBase kbase = loadKnowledgeBaseFromString ( str ) ; org . kie . api . runtime . KieSe... | org . junit . Assert . assertEquals ( 1 , ksession . fireAllRules ( ) ) |
test ( ) { connection . prepareStatement ( "delete<sp>from<sp>stringiduser" ) . execute ( ) ; com . jfireframework . sql . test . entity . StringIdUser user = new com . jfireframework . sql . test . entity . StringIdUser ( ) ; user . setName ( "" ) ; session . save ( user ) ; try { java . sql . ResultSet resultSet = co... | org . junit . Assert . assertEquals ( 1 , result ) |
testAppendedSkipToEndMultiThreaded ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) sb . append ( net . openhft . chronicle . queue . impl . single . UUID . randomUUID ( ) ) ; java . lang . String text = sb . toString ( ) ; try ( net . openhft . chronicle . q... | org . junit . Assert . assertEquals ( toTextIndex ( q , index ) , toTextIndex ( q , actual ) ) |
shouldAddAttributeToProvider ( ) { int before = service . getProviderByUuid ( RestTestConstants1_9 . PROVIDER_UUID ) . getAttributes ( ) . size ( ) ; java . lang . String json = ( "{\"attributeType\":\"" + ( org . openmrs . module . webservices . rest . web . RestTestConstants1_9 . PROVIDER_ATTRIBUTE_TYPE_UUID ) ) + "\... | org . junit . Assert . assertEquals ( ( before + 1 ) , after ) |
shouldPurgeASubclass ( ) { resource . purge ( org . openmrs . module . webservices . rest . web . ClassHierarchyResourceTest . SUBCLASS_UUID , context ) ; org . openmrs . Order purged = org . openmrs . api . context . Context . getOrderService ( ) . getOrderByUuid ( org . openmrs . module . webservices . rest . web . C... | org . junit . Assert . assertNull ( purged ) |
testPromoteBigIntegerAndDoubleResultsInBigDecimalType ( ) { "<AssertPlaceHolder>" ; } promote ( com . redhat . lightblue . metadata . Type , com . redhat . lightblue . metadata . Type ) { if ( ( ( operand1 instanceof com . redhat . lightblue . metadata . types . BigIntegerType ) && ( operand2 instanceof com . redhat . ... | org . junit . Assert . assertEquals ( BigDecimalType . TYPE , com . redhat . lightblue . metadata . types . Arith . promote ( BigIntegerType . TYPE , DoubleType . TYPE ) ) |
validationOfNamespacesSuccess ( ) { java . lang . String roomWithValidNamespaces = "<sp><d:Id>1</d:Id>" 2 + ( ( ( ( ( ( ( ( ( "<sp><d:Id>1</d:Id>" 4 http : com . sap . core . odata . api . edm . EdmEntitySet entitySet = com . sap . core . odata . testutil . mock . MockFacade . getMockEdm ( ) . getDefaultEntityContainer... | org . junit . Assert . assertNotNull ( result ) |
generateDDL_whenTableIsAExternalWebTemporaryTable_returnsDDLStringForAExternalWebTemporaryTable ( ) { org . jkiss . dbeaver . ext . greenplum . model . PostgreTableColumn mockPostgreTableColumn = mockDbColumn ( "\t\'http://example.com/test.txt\'\n" 0 , "int4" , 1 ) ; java . util . List < org . jkiss . dbeaver . ext . g... | org . junit . Assert . assertEquals ( expectedDDL , table . generateDDL ( monitor ) ) |
getPropertyWhenNoExistAsAttributeParam ( ) { final javax . servlet . http . HttpServletRequest httpRequest = mockery . mock ( javax . servlet . http . HttpServletRequest . class ) ; this . mockery . checking ( new org . jmock . Expectations ( ) { { oneOf ( httpRequest ) . getParameter ( "key" ) ; will ( returnValue ( n... | org . junit . Assert . assertEquals ( "value" , request . getProperty ( "key" ) ) |
testCreateKeypairFromAccountNumber ( ) { for ( int i = 0 ; i < ( com . ripple . core . SeedTest . ADDRESS_ARRAY . length ) ; i = i + ( com . ripple . core . SeedTest . ADDRESS_LINE_SIZE ) ) { com . ripple . crypto . ecdsa . IKeyPair keyPair = com . ripple . crypto . ecdsa . Seed . fromPassPhrase ( com . ripple . core .... | org . junit . Assert . assertEquals ( com . ripple . core . SeedTest . ADDRESS_ARRAY [ ( i + 3 ) ] , keyPair . canonicalPubHex ( ) ) |
testPropertyValueOrder ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; try ( java . io . InputStream inputStream = getInputStream ( "tag_order_test.obo" ) ; java . io . InputStreamReader in = new java . io . InputStreamReader ( inputStream ) ; java . io . BufferedReader reader = new java . ... | org . junit . Assert . assertEquals ( input , written ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.