input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testSqueezeExpandChain ( ) { lombok . val origShape = new long [ ] { 3 , 4 , 5 } ; for ( int i = 0 ; i < 3 ; i ++ ) { lombok . val shape = origShape . clone ( ) ; shape [ i ] = 1 ; for ( org . nd4j . linalg . primitives . Pair < org . nd4j . linalg . api . ndarray . INDArray , java . lang . String > p : org . nd4j . li... | org . junit . Assert . assertEquals ( msg , out , inArr ) |
testOnConfiguredWhenInitialUsersNotProvided ( ) { org . apache . nifi . authorization . FileUserGroupProviderTest . writeFile ( primaryTenants , org . apache . nifi . authorization . FileUserGroupProviderTest . EMPTY_TENANTS_CONCISE ) ; userGroupProvider . onConfigured ( configurationContext ) ; final java . util . Set... | org . junit . Assert . assertEquals ( 0 , users . size ( ) ) |
shouldValidateAndReturnTrueWhenNoPropertiesSoAggregatorIsValid ( ) { final uk . gov . gchq . gaffer . store . schema . SchemaElementDefinition elementDef = mock ( uk . gov . gchq . gaffer . store . schema . SchemaElementDefinition . class ) ; final uk . gov . gchq . gaffer . store . schema . SchemaElementDefinitionVali... | org . junit . Assert . assertTrue ( result . isValid ( ) ) |
testPushEvent ( ) { org . gitlab4j . api . webhook . Event pushEvent = makeFakeApiCall ( org . gitlab4j . api . webhook . PushEvent . class , "push-event" ) ; "<AssertPlaceHolder>" ; } compareJson ( T , java . lang . String ) { java . io . InputStreamReader reader = new java . io . InputStreamReader ( org . gitlab4j . ... | org . junit . Assert . assertTrue ( compareJson ( pushEvent , "push-event" ) ) |
testUnarySpecific ( ) { byte [ ] b = new byte [ ] { 28 , 16 , - 92 , 37 , - 98 , - 63 , - 65 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1... | org . junit . Assert . assertTrue ( ( num >= 0 ) ) |
noMatch ( ) { when ( token . getText ( ) ) . thenReturn ( "TOK_X" ) ; processor . process ( node , null , null ) ; "<AssertPlaceHolder>" ; } getTables ( ) { return com . google . common . collect . ImmutableList . copyOf ( tables ) ; } | org . junit . Assert . assertThat ( processor . getTables ( ) , org . hamcrest . CoreMatchers . is ( java . util . Collections . < java . lang . String > emptyList ( ) ) ) |
testWithWrongPackage ( ) { com . google . inject . Injector injector = com . google . inject . Guice . createInjector ( de . devsurf . injection . guice . scanner . StartupModule . create ( de . devsurf . injection . guice . scanner . asm . ASMClasspathScanner . class , de . devsurf . injection . guice . scanner . Pack... | org . junit . Assert . assertNotNull ( injector ) |
searchJobDescriptors ( ) { final org . bonitasoft . engine . persistence . QueryOptions options = new org . bonitasoft . engine . persistence . QueryOptions ( 0 , 10 ) ; final org . bonitasoft . engine . scheduler . model . SJobDescriptor sJobDescriptor = mock ( org . bonitasoft . engine . scheduler . model . SJobDescr... | org . junit . Assert . assertEquals ( sJobDescriptor , result ) |
shouldValidateValidObject ( ) { net . ripe . rpki . commons . validation . ValidationResult validationResult = net . ripe . rpki . commons . validation . ValidationResult . withLocation ( "n/a" ) ; subject . validate ( validationResult ) ; "<AssertPlaceHolder>" ; } hasFailures ( ) { for ( java . util . Map < net . ripe... | org . junit . Assert . assertFalse ( validationResult . hasFailures ( ) ) |
testBinaryEncoding ( ) { final byte [ ] bytes = org . locationtech . geowave . core . index . persist . PersistenceUtils . toBinary ( org . locationtech . geowave . core . index . simple . RoundRobinKeyIndexStrategyTest . compoundIndexStrategy ) ; final org . locationtech . geowave . core . index . CompoundIndexStrateg... | org . junit . Assert . assertArrayEquals ( bytes , bytes2 ) |
searchBetweenDates ( ) { final java . util . Date startDate = getDate ( ( - 60 ) ) ; final java . util . Date endDate = getDate ( 0 ) ; final org . springframework . data . mongodb . core . query . Query query = new org . springframework . data . mongodb . core . query . Query ( org . springframework . data . mongodb .... | org . junit . Assert . assertTrue ( ( ( components . size ( ) ) >= 0 ) ) |
testMin ( ) { boolean expResult = true ; javax . xml . xpath . XPathExpression expr = xpath . compile ( "//xs:element[@name='minField']//xs:minInclusive/@value<sp>=<sp>5" ) ; boolean result = ( ( java . lang . Boolean ) ( expr . evaluate ( schemaDocument , XPathConstants . BOOLEAN ) ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expResult , result ) |
checkYMLFile ( ) { if ( ( mFileType ) != ( alluxio . client . cli . fs . ConfigurationDocGeneratorTest . TYPE . YML ) ) { return ; } java . util . Collection < alluxio . conf . PropertyKey > defaultKeys = new java . util . ArrayList ( ) ; alluxio . conf . PropertyKey pKey = mTestConf . getFirst ( ) ; java . lang . Stri... | org . junit . Assert . assertTrue ( java . nio . file . Files . exists ( p ) ) |
testSCABindingFactory ( ) { org . apache . tuscany . sca . assembly . SCABindingFactory factory = extensionPoints . getExtensionPoint ( org . apache . tuscany . sca . core . FactoryExtensionPoint . class ) . getFactory ( org . apache . tuscany . sca . assembly . SCABindingFactory . class ) ; "<AssertPlaceHolder>" ; } c... | org . junit . Assert . assertNotNull ( factory . createSCABinding ( ) ) |
relativePathRelativizesSamePathTest ( ) { com . beijunyi . parallelgit . filesystem . GitPath path = gfs . getPath ( "a/b/c" ) ; com . beijunyi . parallelgit . filesystem . GitPath samePath = gfs . getPath ( "a/b/c" ) ; com . beijunyi . parallelgit . filesystem . GitPath result = path . relativize ( samePath ) ; "<Asse... | org . junit . Assert . assertEquals ( "" , result . toString ( ) ) |
convertToBooleanNull ( ) { java . lang . Boolean out = converter . toBoolean ( null ) ; "<AssertPlaceHolder>" ; } toBoolean ( java . lang . Long ) { if ( value == null ) { return null ; } return value == 0L ? Boolean . FALSE : Boolean . TRUE ; } | org . junit . Assert . assertNull ( out ) |
testMessageDecodingExceptionString ( ) { java . lang . String m = "message" ; org . jscep . message . MessageDecodingException e = new org . jscep . message . MessageDecodingException ( m ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { if ( ( profile ) == null ) { return "" ; } return profile ; } | org . junit . Assert . assertSame ( m , e . getMessage ( ) ) |
testGetNoResult ( ) { com . ripariandata . timberwolf . writer . hbase . IHBaseTable table = new com . ripariandata . timberwolf . writer . hbase . HBaseTable ( com . ripariandata . timberwolf . MockHTable . create ( ) ) ; org . apache . hadoop . hbase . client . Get get = new org . apache . hadoop . hbase . client . G... | org . junit . Assert . assertTrue ( result . isEmpty ( ) ) |
postAssignment ( ) { when ( assignments . doSingleAssignment ( userID , applicationName , experimentLabel , context , createAssignment , ignoreSamplingPercent , segmentationProfile , headers , forceProfileCheck ) ) . thenReturn ( assignment ) ; when ( assignment . getStatus ( ) ) . thenReturn ( Status . EXPERIMENT_PAUS... | org . junit . Assert . assertNotNull ( resource . postAssignment ( applicationName , experimentLabel , userID , createAssignment , ignoreSamplingPercent , context , segmentationProfile , forceProfileCheck , headers ) ) |
testCoverageLongsHashLength ( ) { com . github . davidmoten . geo . CoverageLongs coverage = new com . github . davidmoten . geo . CoverageLongs ( new long [ ] { } , 0 , 1.0 ) ; "<AssertPlaceHolder>" ; System . out . println ( coverage ) ; } getHashLength ( ) { if ( ( hashes . size ( ) ) == 0 ) return 0 ; else return h... | org . junit . Assert . assertEquals ( 0 , coverage . getHashLength ( ) ) |
testAsInt ( ) { org . apache . tajo . datum . Datum d = org . apache . tajo . datum . DatumFactory . createFloat4 ( 5.0F ) ; "<AssertPlaceHolder>" ; } asInt4 ( ) { throw new org . apache . tajo . datum . exception . InvalidCastException ( ( ( type ) + "<sp>cannot<sp>be<sp>casted<sp>to<sp>INT<sp>type" ) ) ; } | org . junit . Assert . assertEquals ( 5 , d . asInt4 ( ) ) |
runTest ( ) { boolean result = checkNoError ( "Social_ActivityStreams_People_I_Follow" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
testAddApplicationContextListener_returnsTrueWhenActive ( ) { applicationContext = org . eclipse . rap . rwt . internal . application . ApplicationContextImpl_Test . createApplicationContextSpy ( ) ; applicationContext . activate ( ) ; boolean result = applicationContext . addApplicationContextListener ( appContextList... | org . junit . Assert . assertTrue ( result ) |
testInterceptWithBaseServerError ( ) { ca . uhn . fhir . jaxrs . server . interceptor . NotImplementedOperationException thrownException = new ca . uhn . fhir . jaxrs . server . interceptor . NotImplementedOperationException ( "not<sp>implemented" ) ; when ( context . proceed ( ) ) . thenThrow ( thrownException ) ; try... | org . junit . Assert . assertEquals ( e . getMessage ( ) , thrownException . getMessage ( ) ) |
shouldLoadFromScoreOperationChainDeclarationFile ( ) { final java . io . InputStream s = uk . gov . gchq . gaffer . commonutil . StreamUtil . openStream ( getClass ( ) , "TestScoreOperationChainDeclaration.json" ) ; final uk . gov . gchq . gaffer . store . operation . declaration . OperationDeclarations deserialised = ... | org . junit . Assert . assertEquals ( 1 , deserialised . getOperations ( ) . size ( ) ) |
whenDeleteUserWithIdOneThenResultNoUserInStorage ( ) { stor . delete ( 1 ) ; "<AssertPlaceHolder>" ; } read ( java . lang . Integer ) { vkaretko . User result = null ; if ( users . containsKey ( id ) ) { result = users . get ( id ) ; } return result ; } | org . junit . Assert . assertNull ( stor . read ( 1 ) ) |
ofSupplier ( ) { when ( supplier . get ( ) ) . thenReturn ( 10 ) ; com . groupon . lex . metrics . history . xdr . support . reader . SegmentReader < java . lang . Integer > reader = com . groupon . lex . metrics . history . xdr . support . reader . SegmentReader . ofSupplier ( supplier ) ; verifyZeroInteractions ( sup... | org . junit . Assert . assertEquals ( new java . lang . Integer ( 10 ) , reader . decode ( ) ) |
testEquals05 ( ) { java . util . List < org . dresdenocl . modelinstancetype . types . IModelInstanceString > elements01 ; elements01 = new java . util . ArrayList < org . dresdenocl . modelinstancetype . types . IModelInstanceString > ( ) ; elements01 . add ( org . dresdenocl . modelinstancetype . types . base . Basis... | org . junit . Assert . assertFalse ( modelInstanceCollection01 . equals ( modelInstanceCollection02 ) ) |
WhenTransitioningToSuperFromSubstate_SuperEntryActionsNotExecuted ( ) { com . github . oxo42 . stateless4j . StateRepresentation < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > superState = CreateRepresentation ( State . A ) ; com . github . oxo42 . stateless4j . StateRepre... | org . junit . Assert . assertFalse ( executed ) |
testCaRPairwiseTransform1 ( ) { org . nd4j . linalg . api . ndarray . INDArray array = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 0 , 4 , 5 } ) ; org . nd4j . linalg . api . ndarray . INDArray comp = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 3 , 4 , 5 } ) ; o... | org . junit . Assert . assertEquals ( comp , array ) |
testGetParametersWithDefaultEntityAndDisabledStatus ( ) { unit . setActive ( false ) ; org . lnu . is . domain . education . form . type . EducationFormType entity = new org . lnu . is . domain . education . form . type . EducationFormType ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected... | org . junit . Assert . assertEquals ( expected , actual ) |
testExtractFailedOperationNode ( ) { System . out . println ( "extractFailedOperationNode" ) ; org . jboss . dmr . ModelNode node = null ; org . jboss . loom . utils . as7 . BatchFailure expResult = null ; org . jboss . loom . utils . as7 . BatchFailure result = org . jboss . loom . utils . as7 . AS7CliUtils . extractF... | org . junit . Assert . assertEquals ( expResult , result ) |
testGetNotNullHasTypeRefsWhenHasTypeRefIsNull ( ) { final java . util . List < org . kie . workbench . common . dmn . api . definition . HasTypeRef > expectedHasTypeRefs = emptyList ( ) ; final java . util . List < org . kie . workbench . common . dmn . api . definition . HasTypeRef > actualHasTypeRefs = org . kie . wo... | org . junit . Assert . assertEquals ( expectedHasTypeRefs , actualHasTypeRefs ) |
testWithLoop_FromListTail ( ) { linkedlist . LinkedListNode list = linkedlist . LinkedListNode . of ( 1 , 2 , 3 , 4 , 5 ) ; linkedlist . LinkedListNode tail = list . next . next . next . next ; tail . next = tail ; "<AssertPlaceHolder>" ; } detect ( linkedlist . LinkedListNode ) { linkedlist . LinkedListNode runner = h... | org . junit . Assert . assertEquals ( 5 , s . detect ( list ) . val ) |
should_call_delegate ( ) { org . apache . deltaspike . data . test . domain . Simple simple = new org . apache . deltaspike . data . test . domain . Simple ( "test_call_delegate" ) ; simple = repo . saveAndFlushAndRefresh ( simple ) ; "<AssertPlaceHolder>" ; } getId ( ) { return sessionId ; } | org . junit . Assert . assertNotNull ( simple . getId ( ) ) |
testFromHL7EmptyList ( ) { "<AssertPlaceHolder>" ; } fromHL7 ( org . openehealth . ipf . commons . ihe . xds . core . transform . hl7 . List ) { if ( ( hl7PID == null ) || ( hl7PID . isEmpty ( ) ) ) { return null ; } org . openehealth . ipf . commons . ihe . xds . core . metadata . PatientInfo patientInfo = new org . o... | org . junit . Assert . assertNull ( transformer . fromHL7 ( java . util . Collections . < java . lang . String > emptyList ( ) ) ) |
testReadCompletedJobs ( ) { io . seqware . pipeline . engines . whitestar . Persistence persistence = new io . seqware . pipeline . engines . whitestar . Persistence ( path . toFile ( ) ) ; java . util . SortedSet < java . lang . String > result = persistence . readCompletedJobs ( ) ; "<AssertPlaceHolder>" ; } readComp... | org . junit . Assert . assertEquals ( result . size ( ) , 7 ) |
shouldTestIfMapIsSimpleTypeAndReturnFalse ( ) { "<AssertPlaceHolder>" ; } isSimpleType ( java . lang . Class ) { return org . apache . ibatis . type . SimpleTypeRegistry . SIMPLE_TYPE_SET . contains ( clazz ) ; } | org . junit . Assert . assertFalse ( org . apache . ibatis . type . SimpleTypeRegistry . isSimpleType ( java . util . HashMap . class ) ) |
testWhile ( ) { iguana . utils . input . Input input = iguana . utils . input . Input . fromString ( "while" ) ; org . iguana . parser . IguanaParser parser = new org . iguana . parser . IguanaParser ( grammar ) ; org . iguana . parsetree . ParseTreeNode result = parser . getParserTree ( input ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertNull ( result ) |
serializeDeserialize ( ) { java . util . Map < java . lang . String , java . lang . String > ids = new java . util . LinkedHashMap < java . lang . String , java . lang . String > ( ) ; ids . put ( "mbox" , "mailto:joeuser@example.com" ) ; ids . put ( "openid" , "http://openid.org/joeuser" ) ; ids . put ( "mbox_sha1sum"... | org . junit . Assert . assertEquals ( agentJson , clone . toJSON ( version ) ) |
entityTypeCast ( ) { final org . apache . olingo . commons . api . edm . EdmEntityType entityType = org . mockito . Mockito . mock ( org . apache . olingo . commons . api . edm . EdmEntityType . class ) ; final org . apache . olingo . server . api . uri . UriInfo uriInfo = new org . apache . olingo . server . core . ur... | org . junit . Assert . assertEquals ( entityType , uriInfo . getEntityTypeCast ( ) ) |
test_pass_out_long ( ) { org . omg . CORBA . IntHolder x = new org . omg . CORBA . IntHolder ( ) ; server . pass_out_long ( x ) ; "<AssertPlaceHolder>" ; } pass_out_long ( org . omg . CORBA . IntHolder ) { x . value = 83 ; } | org . junit . Assert . assertEquals ( 83 , x . value ) |
checksumAdlerNoFailIfNoFileTest ( ) { java . lang . String nonExistingPath = "nonExistingPath" ; long checksum = org . pentaho . di . core . row . ValueDataUtil . checksumAdler32 ( new org . pentaho . di . core . row . value . ValueMetaString ( ) , nonExistingPath , false ) ; "<AssertPlaceHolder>" ; } checksumAdler32 (... | org . junit . Assert . assertEquals ( 0 , checksum ) |
testSetSubKeyNullRemoval ( ) { pool . getSourceSubscription ( ) . setSubscriptionId ( null ) ; pool . setSubscriptionSubKey ( null ) ; "<AssertPlaceHolder>" ; } getSourceSubscription ( ) { return sourceSubscription ; } | org . junit . Assert . assertNull ( pool . getSourceSubscription ( ) ) |
testAPIOutputModeStaticAccess ( ) { for ( com . digi . xbee . api . models . APIOutputMode apiOutputMode : apiOutputModeValues ) "<AssertPlaceHolder>" ; } get ( int ) { com . digi . xbee . api . models . APIOutputMode apiOutputMode = com . digi . xbee . api . models . APIOutputMode . lookupTable . get ( value ) ; if ( ... | org . junit . Assert . assertEquals ( apiOutputMode , com . digi . xbee . api . models . APIOutputMode . get ( apiOutputMode . getValue ( ) ) ) |
testGetParametersWithDefaultEntityAndDisabledStatus ( ) { unit . setActive ( false ) ; org . lnu . is . domain . person . name . PersonName entity = new org . lnu . is . domain . person . name . PersonName ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < jav... | org . junit . Assert . assertEquals ( expected , actual ) |
testToJson_RGBWithAlpha_null ( ) { org . eclipse . rap . json . JsonValue result = org . eclipse . rap . rwt . remote . JsonMapping . toJson ( ( ( org . eclipse . swt . graphics . RGB ) ( null ) ) , 23 ) ; "<AssertPlaceHolder>" ; } toJson ( org . eclipse . swt . graphics . Color , int ) { if ( ( alpha < 0 ) || ( alpha ... | org . junit . Assert . assertEquals ( JsonValue . NULL , result ) |
testOpt ( ) { org . apache . poi . hssf . usermodel . HSSFWorkbook wb = new org . apache . poi . hssf . usermodel . HSSFWorkbook ( ) ; org . apache . poi . hssf . usermodel . HSSFSheet sheet = wb . createSheet ( ) ; org . apache . poi . hssf . usermodel . HSSFPatriarch patriarch = sheet . createDrawingPatriarch ( ) ; o... | org . junit . Assert . assertSame ( opt1 , opt2 ) |
testBuildWithParametersWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . String abbrName = "Diablo" ; java . lang . String name = "fdsd" ; org . lnu . is . domain . subject . SubjectType context = new org . lnu . is . domain . subject . SubjectType ( ) ; cont... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . dynamic . data . lists . model . DDLRecordSetVersion newDDLRecordSetVersion = addDDLRecordSetVersion ( ) ; com . liferay . dynamic . data . lists . model . DDLRecordSetVersion existingDDLRecordSetVersion = _persistence . fetchByPrimaryKey ( newDDLRecordSetVersion . ge... | org . junit . Assert . assertEquals ( existingDDLRecordSetVersion , newDDLRecordSetVersion ) |
two_$parent_value_comparison_returns_false_when_field_value_does_not_match_expression ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'field':'field6.$parent.field4','op':'<','rvalue':3.5}" ) ; com . redhat . lightblue . eval .... | org . junit . Assert . assertFalse ( ctx . getResult ( ) ) |
testAppendBytesWithNullDoesNothing ( ) { buffer . appendBytes ( null ) ; "<AssertPlaceHolder>" ; } getBuffer ( ) { return buffer ; } | org . junit . Assert . assertNull ( buffer . getBuffer ( ) ) |
testSendNoRetry_ioException_post ( ) { when ( mockedConn . getOutputStream ( ) ) . thenThrow ( new java . io . IOException ( ) ) ; doReturn ( mockedConn ) . when ( sender ) . getConnection ( anyString ( ) ) ; com . google . android . gcm . server . Result result = sender . sendNoRetry ( message , regId ) ; "<AssertPlac... | org . junit . Assert . assertNull ( result ) |
testGetPersistence ( ) { org . rackspace . stingray . client . persistence . Persistence retrievedPersistence = client . getPersistence ( vsName ) ; "<AssertPlaceHolder>" ; } getPersistence ( java . lang . String ) { return getItem ( name , org . rackspace . stingray . client . persistence . Persistence . class , Clien... | org . junit . Assert . assertNotNull ( retrievedPersistence ) |
testVarAndArgs_OK3 ( ) { final java . lang . String cfcSrc = "<cfcomponent>\r\n" + ( ( ( "<cffunction<sp>name=\"test\">\r\n" + "\t<cfargument<sp>name=\"xyz\">\r\n" ) + "<cfset<sp>var<sp>test<sp>=<sp>structkeyexists(arguments,<sp>\"xyz\")/></cffunction>\r\n" ) + "</cfcomponent>" ) ; com . cflint . api . CFLintResult lin... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
givenInput_whenMatchesAnyOfWorks_thenCorrect ( ) { java . lang . Integer year = 1990 ; java . lang . String s = io . vavr . API . Match ( year ) . of ( io . vavr . API . Case ( io . vavr . API . $ ( io . vavr . Predicates . anyOf ( io . vavr . Predicates . isIn ( 1990 , 1991 , 1992 ) , io . vavr . Predicates . is ( 198... | org . junit . Assert . assertEquals ( "Age<sp>match" , s ) |
test_streamed_quads ( ) { org . apache . jena . riot . lang . CollectorStreamQuads out = new org . apache . jena . riot . lang . CollectorStreamQuads ( ) ; java . util . List < org . apache . jena . sparql . core . Quad > expected = writeQuads ( out , 10 ) ; "<AssertPlaceHolder>" ; } getCollected ( ) { return triples ;... | org . junit . Assert . assertEquals ( expected , out . getCollected ( ) ) |
testGetRunningExecutions ( ) { final javax . batch . operations . JobOperator mockJobOperator = mockery . mock ( javax . batch . operations . JobOperator . class ) ; final javax . transaction . TransactionManager mockTranMgr = mockery . mock ( javax . transaction . TransactionManager . class ) ; final javax . transacti... | org . junit . Assert . assertEquals ( retMe , buildJobOperator ( mockJobOperator , mockTranMgr ) . getRunningExecutions ( null ) ) |
bareIndexExpression ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = Index ( 3 ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "[3]" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { return runtime . compile ( str ) ; } | org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) ) |
setterGetterThriftServerStopTimeoutValInSeconds ( ) { int timeout = 10 ; waggleDanceConfiguration . setThriftServerStopTimeoutValInSeconds ( timeout ) ; "<AssertPlaceHolder>" ; } getThriftServerStopTimeoutValInSeconds ( ) { return thriftServerStopTimeoutValInSeconds ; } | org . junit . Assert . assertThat ( waggleDanceConfiguration . getThriftServerStopTimeoutValInSeconds ( ) , org . hamcrest . CoreMatchers . is ( timeout ) ) |
getSuperiorPosByObjectAndPos ( ) { org . egov . pims . commons . Position pos = eisCommonService . getSuperiorPositionByObjectTypeAndPositionFrom ( 7 , 22L ) ; "<AssertPlaceHolder>" ; } getSuperiorPositionByObjectTypeAndPositionFrom ( java . lang . Integer , java . lang . Long ) { return positionHierarchyService . getP... | org . junit . Assert . assertNotNull ( pos ) |
testExpireAt ( ) { doCmdTest ( new org . cyy . fw . nedis . test . shard . TestAction ( ) { @ org . cyy . fw . nedis . test . shard . Override public void doTest ( ) throws org . cyy . fw . nedis . test . shard . InterruptedException , org . cyy . fw . nedis . util . NedisException { int repeats = 20 ; for ( int i = 0 ... | org . junit . Assert . assertEquals ( true , result . getResult ( ) ) |
canCompressAndExpandAString ( ) { java . lang . String s = "ABCDEFGHI" ; uk . co . blackpepper . jsoncompress . JsonCompressor jsonCompressor = new uk . co . blackpepper . jsoncompress . JsonCompressor ( ) ; byte [ ] compress = jsonCompressor . pack ( s . getBytes ( ) , 7 ) ; byte [ ] expand = jsonCompressor . unpack (... | org . junit . Assert . assertEquals ( s , result ) |
visitMatchSrcInterface ( ) { org . batfish . datamodel . acl . MatchSrcInterface matchSrcInterface = org . batfish . datamodel . acl . AclLineMatchExprs . matchSrcInterface ( org . batfish . datamodel . acl . AclLineMatchExprNormalizerTest . IFACE ) ; "<AssertPlaceHolder>" ; } normalize ( org . batfish . datamodel . ac... | org . junit . Assert . assertThat ( normalize ( matchSrcInterface ) , org . hamcrest . Matchers . equalTo ( matchSrcInterface ) ) |
testApplication ( ) { com . skype . Skype . setDebug ( true ) ; com . skype . Application application = com . skype . Skype . addApplication ( com . skype . Ap2ApAPITest . APPLICATION_NAME ) ; com . skype . Friend friend = com . skype . TestData . getFriend ( ) ; checkConnectableFriendsBeforeConnecting ( application ) ... | org . junit . Assert . assertEquals ( 1 , streams . length ) |
remove_Null ( ) { cache . put ( org . cache2k . test . core . BasicLongCacheOperationsTest . KEY , null ) ; cache . remove ( org . cache2k . test . core . BasicLongCacheOperationsTest . KEY ) ; "<AssertPlaceHolder>" ; } containsKey ( K ) { org . cache2k . processor . EntryProcessor < K , V , java . lang . Boolean > p =... | org . junit . Assert . assertFalse ( cache . containsKey ( org . cache2k . test . core . BasicLongCacheOperationsTest . KEY ) ) |
testReflectionTest3 ( ) { try { java . lang . String imei = edu . columbia . cs . psl . test . phosphor . DroidBenchIntTagITCase . taintedString ( ) ; java . lang . Class c = java . lang . Class . forName ( "de.ecspride.ReflectiveClass" ) ; java . lang . Object o = c . newInstance ( ) ; java . lang . reflect . Method m... | org . junit . Assert . assertTrue ( ( ( edu . columbia . cs . psl . test . phosphor . DroidBenchIntTagITCase . getTaint ( s ) ) != 0 ) ) |
testLogToFileMultiple ( ) { org . provebit . utils . Log log = new org . provebit . utils . Log ( logFile ) ; for ( java . lang . String msg : messages ) { log . addEntry ( msg ) ; } log . writeToFile ( ) ; log . endLog ( ) ; java . util . ArrayList < org . provebit . utils . Log . LogEntry > entries = log . getLog ( )... | org . junit . Assert . assertEquals ( messages [ i ] , entries . get ( i ) . getMessage ( ) ) |
shouldReturnNoneWhenNoMatchingHistoricResultExists ( ) { final org . pitest . mutationtest . engine . MutationIdentifier id = org . pitest . mutationtest . LocationMother . aMutationId ( ) . build ( ) ; final java . util . Optional < org . pitest . mutationtest . MutationStatusTestPair > actual = this . testee . getPre... | org . junit . Assert . assertEquals ( java . util . Optional . empty ( ) , actual ) |
reverse ( ) { System . out . println ( "reverse" ) ; org . aksw . limes . core . io . ls . LinkSpecification ls = new org . aksw . limes . core . io . ls . LinkSpecification ( "tmp_after(x.beginsAtDateTime|endsAtDateTime,y.b|e)" , 1.0 ) ; org . aksw . limes . core . execution . planning . planner . DynamicPlanner p = n... | org . junit . Assert . assertTrue ( m . equals ( m3 ) ) |
writeMultipleNamesForSameChannel ( ) { org . diirt . datasource . ReadExpressionTester exp = new org . diirt . datasource . ReadExpressionTester ( org . diirt . datasource . ExpressionLanguage . mapOf ( org . diirt . datasource . ExpressionLanguage . latestValueOf ( org . diirt . datasource . ExpressionLanguage . chann... | org . junit . Assert . assertThat ( dataSource . getChannels ( ) . size ( ) , org . hamcrest . Matchers . equalTo ( 1 ) ) |
testRemove2 ( ) { org . jglue . totorom . VertexTraversal < ? , ? , ? > traversal = graph . V ( ) . has ( "lang" , "java" ) . in ( ) ; traversal . next ( ) ; traversal . remove ( ) ; "<AssertPlaceHolder>" ; } V ( ) { return this ; } | org . junit . Assert . assertEquals ( 5 , graph . V ( ) . count ( ) ) |
GeboorteDatumNaDatumErkenningTest_erkenning_geenGeboorteHistorie ( ) { final nl . bzk . brp . bijhouding . bericht . model . BijhoudingPersoon persoon = mock ( nl . bzk . brp . bijhouding . bericht . model . BijhoudingPersoon . class ) ; when ( persoon . getActueleDatumGeboorte ( ) ) . thenReturn ( 20001229 ) ; when ( ... | org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) ) |
testComputeIndexMapStartSameOrder ( ) { int [ ] expectedIndexMap = new int [ ] { - 1 , 2 , 3 , 4 } ; org . apache . avro . Schema designSchema = org . apache . avro . SchemaBuilder . builder ( ) . record ( "Record" ) . prop ( DiSchemaConstants . TALEND6_DYNAMIC_COLUMN_POSITION , "0" ) . prop ( SchemaConstants . INCLUDE... | org . junit . Assert . assertArrayEquals ( expectedIndexMap , actualIndexMap ) |
testEncodeWithEscapeChars ( ) { org . kaazing . mina . filter . codec . ProtocolCodecSessionEx session = new org . kaazing . mina . filter . codec . ProtocolCodecSessionEx ( ) ; org . kaazing . mina . core . buffer . IoBufferAllocatorEx < ? > allocator = session . getBufferAllocator ( ) ; org . apache . mina . filter .... | org . junit . Assert . assertEquals ( allocator . wrap ( java . nio . ByteBuffer . wrap ( expected ) ) , out ) |
testGetNullWorkflowInstancesByStatus ( ) { java . util . List < org . apache . oodt . cas . workflow . structs . WorkflowInstance > instances = org . apache . oodt . cas . workflow . system . TestXmlRpcWorkflowManagerClient . wmc . getWorkflowInstancesByStatus ( "NULL" ) ; "<AssertPlaceHolder>" ; } getWorkflowInstances... | org . junit . Assert . assertThat ( instances , org . hamcrest . CoreMatchers . is ( empty ( ) ) ) |
testToAdjList_Empty ( ) { int [ ] [ ] adjacent = org . openscience . cdk . graph . GraphUtil . toAdjList ( new org . openscience . cdk . AtomContainer ( ) ) ; "<AssertPlaceHolder>" ; } toAdjList ( org . openscience . cdk . interfaces . IAtomContainer ) { if ( container == null ) throw new java . lang . NullPointerExcep... | org . junit . Assert . assertThat ( adjacent . length , org . hamcrest . CoreMatchers . is ( 0 ) ) |
testExplainDocument ( ) { final com . allanbank . mongodb . bson . Document result1 = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . build ( ) ; final com . allanbank . mongodb . bson . Document query = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . build ( ) ; fina... | org . junit . Assert . assertSame ( result1 , iter ) |
testValidateSchemaPairMissingField ( ) { final org . apache . avro . List < org . apache . avro . Schema . Field > readerFields = list ( new org . apache . avro . Schema . Field ( "oldfield1" , INT_SCHEMA , null , null ) ) ; final org . apache . avro . Schema reader = org . apache . avro . Schema . createRecord ( reade... | org . junit . Assert . assertEquals ( expectedResult , checkReaderWriterCompatibility ( reader , org . apache . avro . TestSchemaCompatibility . WRITER_SCHEMA ) ) |
testAllValid ( ) { java . util . Set < javax . validation . ConstraintViolation < org . kie . workbench . common . stunner . cm . definition . property . task . ProcessReusableSubprocessTaskExecutionSet > > violations = this . validator . validate ( tested ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return violations .... | org . junit . Assert . assertTrue ( violations . isEmpty ( ) ) |
errorMdcMarkerThrowableMessageArgs ( ) { uk . org . lidalia . slf4jtest . LoggingEvent event = uk . org . lidalia . slf4jtest . LoggingEvent . error ( mdc , marker , throwable , message , arg1 , arg2 ) ; uk . org . lidalia . slf4jtest . LoggingEvent expected = new uk . org . lidalia . slf4jtest . LoggingEvent ( ERROR ,... | org . junit . Assert . assertThat ( event , org . hamcrest . core . Is . is ( expected ) ) |
deassignUserRoleForService_null ( ) { org . oscm . domobjects . Subscription sub = givenSubscription ( ) ; org . oscm . domobjects . PlatformUser targetUser = givenTargetUser ( ) ; deassignUserRoleForService ( sub , targetUser , null ) ; java . util . List < org . oscm . auditlog . model . AuditLogEntry > logEntries = ... | org . junit . Assert . assertNull ( logEntries ) |
getConfigs ( ) { try { java . util . List < org . apache . openmeetings . db . entity . basic . Configuration > list = cfgDao . get ( 4 , 6 ) ; for ( org . apache . openmeetings . db . entity . basic . Configuration conf : list ) { org . apache . openmeetings . config . TestConfig . log . error ( ( "conf.getKey()<sp>" ... | org . junit . Assert . assertEquals ( list . size ( ) , 6 ) |
testVerticaTimeType ( ) { java . sql . ResultSetMetaData metaData = mock ( java . sql . ResultSetMetaData . class ) ; org . pentaho . di . core . row . ValueMetaInterface valueMetaInterface = mock ( org . pentaho . di . core . row . value . ValueMetaInternetAddress . class ) ; when ( resultSet . getMetaData ( ) ) . the... | org . junit . Assert . assertEquals ( new java . sql . Time ( 0 ) , ret ) |
whenNone ( ) { class Customer { public void someAction ( @ org . apache . isis . applib . annotation . Parameter final java . lang . String name ) { } } actionMethod = findMethod ( Customer . class , "someAction" , new java . lang . Class [ ] { java . lang . String . class } ) ; final org . apache . isis . core . metam... | org . junit . Assert . assertNull ( regExFacet ) |
testSuccess ( ) { com . twitter . nodes . Node < java . lang . Boolean > node = com . twitter . nodes . IfSuccessfulNode . create ( com . twitter . nodes . Node . value ( 100 ) ) ; "<AssertPlaceHolder>" ; } resultFromNode ( com . twitter . nodes . Node ) { return com . twitter . nodes . NodeTestBase . resultFromFuture ... | org . junit . Assert . assertTrue ( resultFromNode ( node ) ) |
testLazyIfWithNestedFunction ( ) { com . udojava . evalex . Expression expression = new com . udojava . evalex . Expression ( "if(a=0,0,abs(12/a))" ) ; expression . setVariable ( "a" , new java . math . BigDecimal ( 0 ) ) ; "<AssertPlaceHolder>" ; } eval ( ) { return this . eval ( getParams ( ) ) ; } | org . junit . Assert . assertEquals ( expression . eval ( ) , new java . math . BigDecimal ( 0 ) ) |
givenBooleanType_whenIsBoolean_thenReturnTrue ( ) { org . robobinding . codegen . apt . type . WrappedPrimitiveType type = org . robobinding . codegen . apt . type . WrappedPrimitiveTypeTest . wrappedPrimitiveType ( TypeKind . BOOLEAN ) ; "<AssertPlaceHolder>" ; } isBoolean ( ) { return type . getKind ( ) . equals ( Ty... | org . junit . Assert . assertThat ( type . isBoolean ( ) , org . hamcrest . Matchers . equalTo ( true ) ) |
testCollectionsSortSingleColumnAscending ( ) { com . liferay . portal . kernel . model . EmailAddress emailAddress1 = newEmailAddress ( 1 , newDate ( 0 , 1 , 2012 ) , "abc@liferay.com" ) ; com . liferay . portal . kernel . model . EmailAddress emailAddress2 = newEmailAddress ( 2 , newDate ( 0 , 2 , 2012 ) , "def@lifera... | org . junit . Assert . assertEquals ( expectedList . toString ( ) , actualList . toString ( ) ) |
evaluates__fail ( ) { io . github . seleniumquery . SeleniumQueryObject sqo = testinfrastructure . testdouble . io . github . seleniumquery . SeleniumQueryObjectMother . createStubSeleniumQueryObjectWithElements ( new io . github . seleniumquery . functions . jquery . manipulation . TextFunctionTest . WebElementText ( ... | org . junit . Assert . assertFalse ( evaluate . isSatisfiesConstraints ( ) ) |
testSetAnnoation ( ) { resource . setAnnotation ( "black" , "white" ) ; "<AssertPlaceHolder>" ; } getAnnotation ( java . lang . String ) { return getAnnotations ( ) . get ( key ) ; } | org . junit . Assert . assertEquals ( "white" , resource . getAnnotation ( "black" ) ) |
createPortletConfigurationIcon ( ) { wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareMaven ( project . getName ( ) , com . liferay . ide . ui . module . tests . PORTLET_CONFIGURATION_ICON ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningJobs ( ) ; viewAction . project . open... | org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( project . getName ( ) ) ) |
testFilterEquals ( ) { io . katharsis . queryspec . QuerySpec expectedSpec = new io . katharsis . queryspec . QuerySpec ( io . katharsis . resource . mock . models . Task . class ) ; expectedSpec . addFilter ( new io . katharsis . queryspec . FilterSpec ( java . util . Arrays . asList ( "id" ) , io . katharsis . querys... | org . junit . Assert . assertEquals ( expectedSpec , actualSpec ) |
getSectionsOverride ( ) { com . xpn . xwiki . objects . BaseObject o = org . mockito . Mockito . mock ( com . xpn . xwiki . objects . BaseObject . class ) ; java . util . List < java . lang . String > sections = java . util . Collections . singletonList ( "patient_info" ) ; org . mockito . Mockito . when ( o . getListV... | org . junit . Assert . assertSame ( sections , result . getSectionsOverride ( ) ) |
length ( ) { "<AssertPlaceHolder>" ; } length ( ) { org . junit . Assert . assertEquals ( 7 , new com . machinezoo . sourceafis . Range ( 3 , 10 ) . length ( ) ) ; } | org . junit . Assert . assertEquals ( 7 , new com . machinezoo . sourceafis . Range ( 3 , 10 ) . length ( ) ) |
testGetSetDescription ( ) { java . lang . String expectedDescription = "testDescription" ; com . microsoft . windowsazure . services . media . models . MediaProcessorInfo mediaProcessorInfo = new com . microsoft . windowsazure . services . media . models . MediaProcessorInfo ( null , new com . microsoft . windowsazure ... | org . junit . Assert . assertEquals ( expectedDescription , actualDescription ) |
testAfterFailure ( ) { com . kakao . hbase . common . HBaseClient . setAdminForTesting ( admin ) ; java . lang . String commandName = "assign" ; java . lang . String [ ] args = new java . lang . String [ ] { commandName , "localhost" , "balancer" , "invalid" , ( ( "--" + ( com . kakao . hbase . common . Args . OPTION_A... | org . junit . Assert . assertEquals ( ( sendCountBefore + 1 ) , com . kakao . hbase . common . util . AlertSender . getSendCount ( ) ) |
shouldParseCapturingIntLengthMatcher ( ) { java . lang . String scriptFragment = "(int:capture)" ; org . kaazing . k3po . lang . internal . parser . ScriptParserImpl parser = new org . kaazing . k3po . lang . internal . parser . ScriptParserImpl ( ) ; org . kaazing . k3po . lang . internal . ast . matcher . AstFixedLen... | org . junit . Assert . assertEquals ( expected , actual ) |
testEmptyItemDocumentBuild ( ) { org . wikidata . wdtk . datamodel . interfaces . ItemDocument id1 = org . wikidata . wdtk . datamodel . helpers . Datamodel . makeItemDocument ( ItemIdValue . NULL , java . util . Collections . emptyList ( ) , java . util . Collections . emptyList ( ) , java . util . Collections . empty... | org . junit . Assert . assertEquals ( id1 , id2 ) |
testTranspose ( ) { "<AssertPlaceHolder>" ; } transpose ( ) { jama . FloatMatrix X = new jama . FloatMatrix ( n , m ) ; float [ ] [ ] C = X . getArray ( ) ; for ( int i = 0 ; i < ( m ) ; i ++ ) { for ( int j = 0 ; j < ( n ) ; j ++ ) { C [ j ] [ i ] = A [ i ] [ j ] ; } } return X ; } | org . junit . Assert . assertEquals ( A . transpose ( ) , T ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.