input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
validate_SetVariableResultIsSet_returnsTrue ( ) { boolean expected = true ; eu . chargetime . ocpp . model . basic . types . SetVariableResultType setVariableResultTypeStub = mock ( eu . chargetime . ocpp . model . basic . types . SetVariableResultType . class ) ; when ( setVariableResultTypeStub . validate ( ) ) . the... | org . junit . Assert . assertEquals ( expected , result ) |
testHuidigHuwelijkMetAanvangNLmetBuitelandsPersoonWijzigingNaam ( ) { final nl . bzk . brp . model . bericht . kern . HuwelijkGeregistreerdPartnerschapBericht huwelijk = maakHuwelijkBericht ( true , true ) ; final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView man = maakPersoonView ( false ) ; f... | org . junit . Assert . assertEquals ( 1 , berichtEntiteiten . size ( ) ) |
testThatCachePreservesResponse ( ) { when ( _backEnd . login ( any ( javax . security . auth . Subject . class ) ) ) . thenReturn ( _reply ) ; org . dcache . auth . LoginReply reply = _cache . login ( _subject ) ; "<AssertPlaceHolder>" ; } login ( javax . security . auth . Subject ) { org . dcache . gplazma . monitor .... | org . junit . Assert . assertThat ( reply , org . hamcrest . Matchers . is ( _reply ) ) |
testFormatSubobject3 ( ) { final byte [ ] array = new byte [ ] { 2 , 3 } ; final byte [ ] expected = new byte [ ] { 1 , 4 , 2 , 3 } ; final io . netty . buffer . ByteBuf body = io . netty . buffer . Unpooled . copiedBuffer ( array ) ; final io . netty . buffer . ByteBuf aggregator = io . netty . buffer . Unpooled . buf... | org . junit . Assert . assertArrayEquals ( expected , aggregator . array ( ) ) |
testGetSQLEntryHistorySize ( ) { classUnderTest . setSQLEntryHistorySize ( 10 ) ; "<AssertPlaceHolder>" ; } getSQLEntryHistorySize ( ) { return _sqlEntryHistorySize ; } | org . junit . Assert . assertEquals ( 10 , classUnderTest . getSQLEntryHistorySize ( ) ) |
testGenerateAnyFromDynAny ( ) { java . lang . String msg ; org . omg . CORBA . Any any = null ; org . omg . CORBA . TypeCode tc = null ; org . omg . DynamicAny . DynAny dynAny = null ; org . omg . DynamicAny . DynAny dynAny2 = null ; tc = orb . get_primitive_tc ( org . omg . CORBA . TCKind . tk_long ) ; dynAny = create... | org . junit . Assert . assertTrue ( msg , dynAny . equal ( dynAny2 ) ) |
testCreateSecurityRole ( ) { org . finra . herd . model . api . xml . SecurityRole securityRole = securityRoleService . createSecurityRole ( new org . finra . herd . model . api . xml . SecurityRoleCreateRequest ( SECURITY_ROLE , DESCRIPTION ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . SecurityRole ( SECURITY_ROLE , DESCRIPTION ) , securityRole ) |
shouldApplyRelationshipGroupCommandToTheStoreInRecovery ( ) { final org . neo4j . kernel . impl . api . BatchTransactionApplier applier = newApplier ( true ) ; final org . neo4j . kernel . impl . store . record . RelationshipGroupRecord before = new org . neo4j . kernel . impl . store . record . RelationshipGroupRecord... | org . junit . Assert . assertFalse ( result ) |
string_is_null_or_empty_java ( ) { java . lang . String outputVal = null ; java . lang . String stringToCheck = "abc" ; if ( ( stringToCheck != null ) && ( ( stringToCheck . length ( ) ) > 0 ) ) { outputVal = "do<sp>some<sp>work" ; } "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( "do<sp>some<sp>work" , outputVal ) |
testGetFWRevisionFail ( ) { org . eclipse . kura . bluetooth . le . BluetoothLeGattService infoSvcMock = mock ( org . eclipse . kura . bluetooth . le . BluetoothLeGattService . class ) ; doThrow ( new org . eclipse . kura . KuraBluetoothResourceNotFoundException ( "test" ) ) . when ( infoSvcMock ) . findCharacteristic ... | org . junit . Assert . assertEquals ( "" , tag . getFirmareRevision ( ) ) |
testAnnotateString ( ) { org . eclipse . debug . core . ILaunchConfigurationWorkingCopy tempConfig = config . copy ( "test-config" ) ; tempConfig . setAttribute ( PerfPlugin . ATTR_Kernel_Location , "resources/defaultevent-data/perf.data" 4 ) ; tempConfig . setAttribute ( PerfPlugin . ATTR_ModuleSymbols , true ) ; java... | org . junit . Assert . assertArrayEquals ( expectedString , annotateString ) |
getETagGetsNull ( ) { com . microsoft . azure . sdk . iot . service . devicetwin . DeviceTwinDevice testDevice = new com . microsoft . azure . sdk . iot . service . devicetwin . DeviceTwinDevice ( "testDevice" ) ; java . lang . String etag = testDevice . getETag ( ) ; "<AssertPlaceHolder>" ; } getETag ( ) { return this... | org . junit . Assert . assertNull ( etag ) |
test ( ) { "<AssertPlaceHolder>" ; driver . get ( "https://bonigarcia.github.io/selenium-jupiter/" ) ; } | org . junit . Assert . assertNotNull ( driver ) |
testRequestHeaderConverter ( ) { ch . qos . logback . access . pattern . RequestHeaderConverter converter = new ch . qos . logback . access . pattern . RequestHeaderConverter ( ) ; java . util . List < java . lang . String > optionList = new java . util . ArrayList < java . lang . String > ( ) ; optionList . add ( "hea... | org . junit . Assert . assertEquals ( request . getHeader ( "headerName1" ) , result ) |
testSortedByIteratorExp01 ( ) { testpackage . Class1 class1 ; class1 = new testpackage . Class1 ( ) ; java . util . List < java . lang . Integer > expectedResult = new java . util . ArrayList < java . lang . Integer > ( ) ; expectedResult . add ( 3 ) ; expectedResult . add ( 2 ) ; expectedResult . add ( 1 ) ; "<AssertP... | org . junit . Assert . assertEquals ( expectedResult , class1 . testSortedByIteratorExp01 ( ) ) |
testPrepend ( ) { client . set ( com . spotify . folsom . IntegrationTest . KEY1 , com . spotify . folsom . IntegrationTest . VALUE1 , com . spotify . folsom . IntegrationTest . TTL ) . toCompletableFuture ( ) . get ( ) ; client . prepend ( com . spotify . folsom . IntegrationTest . KEY1 , com . spotify . folsom . Inte... | org . junit . Assert . assertEquals ( ( ( com . spotify . folsom . IntegrationTest . VALUE2 ) + ( com . spotify . folsom . IntegrationTest . VALUE1 ) ) , client . get ( com . spotify . folsom . IntegrationTest . KEY1 ) . toCompletableFuture ( ) . get ( ) ) |
testSqrtNaN ( ) { "<AssertPlaceHolder>" ; } sqrt ( ) { if ( isNaN ) { return org . hipparchus . complex . Complex . NaN ; } if ( ( ( real ) == 0.0 ) && ( ( imaginary ) == 0.0 ) ) { return createComplex ( 0.0 , 0.0 ) ; } double t = org . hipparchus . util . FastMath . sqrt ( ( ( ( org . hipparchus . util . FastMath . ab... | org . junit . Assert . assertTrue ( Complex . NaN . sqrt ( ) . isNaN ( ) ) |
testGetAndSetJMSDestination ( ) { org . apache . qpid . jms . message . JmsMessage msg = factory . createMessage ( ) ; msg . setJMSDestination ( this . jmsDestination ) ; "<AssertPlaceHolder>" ; } getJMSDestination ( ) { return facade . getDestination ( ) ; } | org . junit . Assert . assertTrue ( msg . getJMSDestination ( ) . equals ( this . jmsDestination ) ) |
testFindProfile ( ) { fr . gouv . vitam . common . thread . VitamThreadUtils . getVitamSession ( ) . setTenantId ( fr . gouv . vitam . functional . administration . common . server . MongoDbAccessAdminImplTest . TENANT_ID ) ; final fr . gouv . vitam . functional . administration . common . server . FunctionalAdminColle... | org . junit . Assert . assertEquals ( "FakeId" , foundProfile . getString ( Profile . IDENTIFIER ) ) |
isBetweenWithStringWorking ( ) { if ( isBatoo ( ) ) { return ; } final java . lang . String subQueryJPQL = "select<sp>r.id<sp>from<sp>RegularEntityOne<sp>r<sp>where<sp>r.stringAttribute<sp>between<sp>'Just<sp>a<sp>String<sp>0'<sp>and<sp>'Just<sp>a<sp>String<sp>02'" ; final java . lang . String query = ( ( "select<sp>r<... | org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) > 0 ) ) |
ensureEnumsHaveSameItems ( ) { com . streamsets . datacollector . execution . PreviewStatus [ ] realStatuses = com . streamsets . datacollector . execution . PreviewStatus . values ( ) ; "<AssertPlaceHolder>" ; for ( com . streamsets . datacollector . execution . PreviewStatus status : realStatuses ) { PreviewInfoJson ... | org . junit . Assert . assertEquals ( realStatuses . length , PreviewInfoJson . StatusEnum . values ( ) . length ) |
givenString_whenUsingLoop_thenCountChars ( ) { java . lang . String someString = "elephant" ; char someChar = 'e' ; int count = 0 ; for ( int i = 0 ; i < ( someString . length ( ) ) ; i ++ ) { if ( ( someString . charAt ( i ) ) == someChar ) { count ++ ; } } "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 2 , count ) |
testSetCaptionSuccessfull ( ) { java . lang . String val = "sample<sp>caption" ; instance . setCaption ( val ) ; "<AssertPlaceHolder>" ; } getCaption ( ) { return caption ; } | org . junit . Assert . assertEquals ( val , instance . getCaption ( ) ) |
testV2Compatible ( ) { System . out . println ( "test:testV2Compatible" ) ; org . glassfish . flashlight . datatree . TreeNode server = setupComplexTree ( ) ; java . util . List < org . glassfish . flashlight . datatree . TreeNode > list = server . getNodes ( "*wtodaughter*" , false , true ) ; int expectedLength = 2 ; ... | org . junit . Assert . assertEquals ( expectedLength , list . size ( ) ) |
testMultipleIDs ( ) { org . umlg . sqlg . structure . topology . Schema aSchema = this . sqlgGraph . getTopology ( ) . ensureSchemaExist ( "A" ) ; aSchema . ensureVertexLabelExist ( "A" , new org . umlg . sqlg . test . usersuppliedpk . topology . HashMap < java . lang . String , org . umlg . sqlg . structure . Property... | org . junit . Assert . assertEquals ( count , vertices . size ( ) ) |
testArrayConstructorReference ( ) { org . robovm . rt . lambdas . Java8Test . ArrayCtor ctor = org . robovm . rt . lambdas . Java8Test . ArrayElem [ ] [ ] [ ] :: new ; org . robovm . rt . lambdas . Java8Test . ArrayElem [ ] [ ] [ ] array = ctor . copy ( 100 ) ; "<AssertPlaceHolder>" ; } copy ( java . nio . CharSequence... | org . junit . Assert . assertEquals ( 100 , array . length ) |
getCanonicalClassNameInMethodName_A$ ( ) { java . lang . String canonicalClassName = "com.example.Bean" ; org . junithelper . core . config . extension . ExtArg target = new org . junithelper . core . config . extension . ExtArg ( canonicalClassName ) ; java . lang . String actual = target . getCanonicalClassNameInMeth... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
notEqualsByValueExclusionsMismatchThis ( ) { final org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenCoordinate coordinate = this . createCoordinate ( ) ; final org . jboss . shrinkwrap . resolver . api . maven . ScopeType scope = org . jboss . shrinkwrap . resolver . api . maven . ScopeType . RUNTI... | org . junit . Assert . assertTrue ( dependency1 . equals ( dependency2 ) ) |
testProcessDocumentURLWithThumbnailParameter ( ) { com . liferay . document . library . document . conversion . internal . DocumentHTMLProcessor documentHTMLProcessor = new com . liferay . document . library . document . conversion . internal . DocumentHTMLProcessor ( ) ; java . lang . String originalHTML = com . lifer... | org . junit . Assert . assertEquals ( expectedHTML , processedHTML ) |
removeVertexTest ( ) { final java . util . List < java . lang . Integer > expected = com . google . common . collect . ImmutableList . of ( 1 , 3 ) ; final edu . snu . spl . cruise . utils . DAG < java . lang . Integer > dag = new edu . snu . spl . cruise . utils . DAGImpl ( ) ; dag . addVertex ( 1 ) ; dag . addVertex ... | org . junit . Assert . assertEquals ( new java . util . HashSet ( expected ) , dag . getRootVertices ( ) ) |
methodRuleIsIntroducedAndEvaluatedOnSubclass ( ) { org . junit . rules . TestRuleTest . wasRun = false ; org . junit . runner . JUnitCore . runClasses ( org . junit . rules . TestRuleTest . MethodSonOfExampleTest . class ) ; "<AssertPlaceHolder>" ; } runClasses ( java . lang . Class [ ] ) { return org . junit . runner ... | org . junit . Assert . assertTrue ( org . junit . rules . TestRuleTest . wasRun ) |
itReturnsUniqueListsFromCriteriaQueries ( ) { when ( critera . list ( ) ) . thenReturn ( com . google . common . collect . ImmutableList . of ( "woo" ) ) ; "<AssertPlaceHolder>" ; verify ( session ) . createCriteria ( java . lang . String . class ) ; verify ( critera ) . list ( ) ; } getListFromCriteria ( ) { return li... | org . junit . Assert . assertThat ( dao . getListFromCriteria ( ) , org . hamcrest . CoreMatchers . is ( ( ( java . util . List < java . lang . String > ) ( com . google . common . collect . ImmutableList . of ( "woo" ) ) ) ) ) |
testAboveThresholdSpecifiedRepository ( ) { java . lang . String tempPath = java . lang . System . getProperty ( "java.io.tmpdir" ) ; java . lang . String tempDirName = "testAboveThresholdSpecifiedRepository" ; java . io . File tempDir = new java . io . File ( tempPath , tempDirName ) ; org . apache . commons . io . Fi... | org . junit . Assert . assertTrue ( tempDir . delete ( ) ) |
testJweRsaJwsRsaCertInHeaders ( ) { java . lang . String address = ( "https://localhost:" + ( org . apache . cxf . systest . jaxrs . security . jose . jwejws . JAXRSJweJwsTest . PORT ) ) + "/jwejwsrsaCertInHeaders" ; org . apache . cxf . systest . jaxrs . security . jose . BookStore bs = createJweJwsBookStore ( address... | org . junit . Assert . assertEquals ( "book" , text ) |
applySuffixReplaceSNAPSHOT ( ) { final java . util . Properties props = new java . util . Properties ( ) ; final java . lang . String s = "foo" ; props . setProperty ( VersioningState . INCREMENT_SERIAL_SUFFIX_SYSPROP . getCurrent ( ) , s ) ; setupSession ( props ) ; final java . lang . String originalVersion = "1.0.0.... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . equalTo ( calcdVersion ) ) |
longArray ( ) { long [ ] [ ] inLongArray = new long [ 2 ] [ 2 ] ; inLongArray [ 0 ] [ 0 ] = 0 ; inLongArray [ 0 ] [ 1 ] = 1 ; inLongArray [ 1 ] [ 0 ] = 2 ; inLongArray [ 1 ] [ 1 ] = 3 ; org . tensorflow . Tensor inTensor = org . tensorflow . Tensor . create ( inLongArray ) ; java . lang . String jsonTensor = org . spri... | org . junit . Assert . assertArrayEquals ( inLongArray , outLongArray ) |
testSerializationOfPassivationCapableComponent ( javax . enterprise . inject . spi . BeanManager ) { javax . enterprise . inject . spi . Bean < org . jboss . weld . tests . contexts . passivating . serialization . ShoppingCart > bean = org . jboss . weld . util . reflection . Reflections . cast ( manager . getBeans ( o... | org . junit . Assert . assertEquals ( 3 , org . jboss . weld . tests . contexts . passivating . serialization . OutputWriter . getCounter ( ) ) |
shouldValidateAndReturnTrueWhenEntityTransformerResult ( ) { final uk . gov . gchq . gaffer . store . schema . ViewValidator validator = new uk . gov . gchq . gaffer . store . schema . ViewValidator ( ) ; final uk . gov . gchq . gaffer . data . elementdefinition . view . View view = new uk . gov . gchq . gaffer . data ... | org . junit . Assert . assertTrue ( result . isValid ( ) ) |
test ( ) { java . lang . String id = "1" ; java . lang . String logMessage = "Log<sp>message" ; org . pentaho . di . core . logging . LogChannelFileWriterBuffer buffer = new org . pentaho . di . core . logging . LogChannelFileWriterBuffer ( id ) ; buffer . addEvent ( new org . pentaho . di . core . logging . KettleLogg... | org . junit . Assert . assertTrue ( log . contains ( logMessage ) ) |
testInschrijvingDoorGeboorteMetErkenningMetInschrevenOudersMeerderNationaliteitenInTweeActie ( ) { java . lang . String xmlBericht = "afstamming_inschrijvingDoorGeboorteMetErkenning_ingeschrevenOudersMet2Nation2.xml" ; zetActieVoorBericht ( "registreerGeboorte" ) ; voegObjectSleutelXPathMetBijbehorendePersoonIdToe ( "/... | org . junit . Assert . assertNotNull ( antwoord ) |
testDoWork ( ) { com . captaindebug . threading . bad_example . ThreadWrapper instance = new com . captaindebug . threading . bad_example . ThreadWrapper ( ) ; instance . doWork ( ) ; java . lang . Thread . sleep ( 10000 ) ; boolean result = getResultFromDatabase ( ) ; "<AssertPlaceHolder>" ; } getResultFromDatabase ( ... | org . junit . Assert . assertTrue ( result ) |
testIsConnected ( ) { testProvider . connected = true ; "<AssertPlaceHolder>" ; } isConnected ( ) { return connected ; } | org . junit . Assert . assertTrue ( testProvider . isConnected ( ) ) |
testTwoDeadlocks ( ) { com . geophile . erdo . TestKey k0 = key ( 0 ) ; com . geophile . erdo . TestKey k1 = key ( 1 ) ; com . geophile . erdo . TestKey k2 = key ( 2 ) ; com . geophile . erdo . TestKey k3 = key ( 3 ) ; a . lock ( k0 ) ; b . lock ( k1 ) ; a . lock ( k1 ) ; b . lock ( k0 ) ; c . lock ( k2 ) ; d . lock ( ... | org . junit . Assert . assertEquals ( 2 , count ) |
testEmptySearchFilterAfterConvertWithConfigurationWithEmptySearchFilters ( ) { populateDiscoveryConfigurationWithEmptyList ( ) ; searchConfigurationRest = discoverConfigurationConverter . convert ( discoveryConfiguration ) ; "<AssertPlaceHolder>" ; } getFilters ( ) { return org . dspace . rest . filter . ItemFilterDefs... | org . junit . Assert . assertEquals ( 0 , searchConfigurationRest . getFilters ( ) . size ( ) ) |
testIsEpoch ( ) { android . text . format . Time t = new android . text . format . Time ( ) ; boolean isEpoch = android . text . format . Time . isEpoch ( t ) ; "<AssertPlaceHolder>" ; } isEpoch ( android . text . format . Time ) { long millis = time . toMillis ( true ) ; return ( org . robolectric . shadows . ShadowTi... | org . junit . Assert . assertEquals ( true , isEpoch ) |
testEncode ( ) { java . lang . String [ ] [ ] tests = new java . lang . String [ ] [ ] { new java . lang . String [ ] { "Test<sp><code>title</code>" , "Test <code>title</code>" } , new java . lang . String [ ] { "ahoj" , "ahoj" } , new java . lang . String [ ] { "<>|&\"\'" , "<>|&"&... | org . junit . Assert . assertEquals ( test [ 1 ] , org . opengrok . indexer . web . Util . encode ( test [ 0 ] ) ) |
testSimpleLineTag ( ) { java . lang . String in = "/**<sp>foo.\n<sp>*<sp>@stubLineTagTitle<sp>\n<sp>*/" ; org . eclipse . n4js . jsdoc . tags . AbstractLineTagDefinition tag = new org . eclipse . n4js . jsdoc . tags . StubLineTagWithRegionDefinition ( "stubLineTagTitle" ) ; org . eclipse . n4js . jsdoc . DocletParser d... | org . junit . Assert . assertEquals ( "stubLineTagTitle" , lineTag . getTitle ( ) . getTitle ( ) ) |
setLevelToNull_A ( ) { loggerTest . setLevel ( null ) ; "<AssertPlaceHolder>" ; } getEffectiveLevel ( ) { int result = level ; int effLevel ; java . util . Iterator < ch . qos . logback . core . status . Status > it = iterator ( ) ; ch . qos . logback . core . status . Status s ; while ( it . hasNext ( ) ) { s = ( ( ch... | org . junit . Assert . assertEquals ( root . getEffectiveLevel ( ) , loggerTest . getEffectiveLevel ( ) ) |
testHavingWithoutAggregate ( ) { java . lang . Object date = org . apache . cayenne . query . ObjectSelect . columnQuery ( org . apache . cayenne . testdo . testmap . Artist . class , Artist . DATE_OF_BIRTH , Artist . ARTIST_NAME ) . having ( Artist . ARTIST_NAME . like ( "a%" ) ) . selectFirst ( context ) ; "<AssertPl... | org . junit . Assert . assertNotNull ( date ) |
size ( ) { "<AssertPlaceHolder>" ; } size ( ) { return values . size ( ) ; } | org . junit . Assert . assertEquals ( 2 , values . size ( ) ) |
testStartInstance_Null ( ) { org . easymock . EasyMock . expect ( computeRpcMock . start ( com . google . cloud . compute . deprecated . ComputeImplTest . INSTANCE_ID . getZone ( ) , com . google . cloud . compute . deprecated . ComputeImplTest . INSTANCE_ID . getInstance ( ) , com . google . cloud . compute . deprecat... | org . junit . Assert . assertNull ( compute . start ( com . google . cloud . compute . deprecated . ComputeImplTest . INSTANCE_ID ) ) |
columnSerial ( ) { makeSeparateAIS ( ) ; com . foundationdb . sql . aisddl . TableDDLTest . dropTable = com . foundationdb . ais . model . TableName . create ( com . foundationdb . sql . aisddl . TableDDLTest . DEFAULT_SCHEMA , com . foundationdb . sql . aisddl . TableDDLTest . DEFAULT_TABLE ) ; builder . table ( com .... | org . junit . Assert . assertTrue ( ( stmt instanceof com . foundationdb . sql . parser . CreateTableNode ) ) |
testGetters ( ) { com . github . sviperll . adt4j . examples . Optional < java . lang . String > optional = com . github . sviperll . adt4j . examples . Optional . < java . lang . String > present ( "str1" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( "str1" , optional . getValue ( ) ) |
createWithExistingIdentifierConcept ( ) { java . lang . String newIdentifierConceptId = com . b2international . snowowl . snomed . api . rest . SnomedRestFixtures . createNewConcept ( branchPath , com . b2international . snowowl . snomed . datastore . SnomedRefSetUtil . getParentConceptId ( refSetType ) ) ; "<AssertPla... | org . junit . Assert . assertEquals ( newIdentifierConceptId , com . b2international . snowowl . snomed . api . rest . SnomedRestFixtures . createNewRefSet ( branchPath , refSetType , newIdentifierConceptId ) ) |
testAutoDecompression2 ( ) { org . nd4j . linalg . api . ndarray . INDArray array = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 10 , 11 ) ; org . nd4j . linalg . api . ndarray . INDArray compressed = org . nd4j . linalg . factory . Nd4j . getCompressor ( ) . compress ( array , "GZIP" ) ; org . apache . common... | org . junit . Assert . assertEquals ( array , decomp ) |
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = ne... | org . junit . Assert . assertTrue ( journalContentSearchs . isEmpty ( ) ) |
test_getPathInWorkspace_windows_with_mixed_separators_ok ( ) { java . lang . String workspace = "C:\\path\\to\\spring-petclinic" ; java . lang . String absolutePath = "C:\\path\\to\\spring-petclinic\\target/abc.xml" ; java . lang . String actual = org . jenkinsci . plugins . pipeline . maven . util . XmlUtils . getPath... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) ) |
isSLF4JPrintStreamReturnsTrueWhenSystemOutIsSLF4JPrintStream ( ) { uk . org . lidalia . sysoutslf4j . context . SysOutOverSLF4J . sendSystemOutAndErrToSLF4J ( ) ; "<AssertPlaceHolder>" ; } systemOutputsAreSLF4JPrintStreams ( ) { return uk . org . lidalia . sysoutslf4j . context . SysOutOverSLF4J . doWithSystemClasses (... | org . junit . Assert . assertTrue ( uk . org . lidalia . sysoutslf4j . context . SysOutOverSLF4J . systemOutputsAreSLF4JPrintStreams ( ) ) |
createTableAs1 ( ) { makeSeparateAIS ( ) ; java . lang . String sql = "CREATE<sp>TABLE<sp>t1<sp>(column1,<sp>column2,<sp>column3)<sp>AS<sp>(SELECT<sp>c1,<sp>c2,<sp>c3<sp>FROM<sp>t2)<sp>WITH<sp>NO<sp>DATA" ; createTableAsColumnGenerateAIS ( ) ; com . foundationdb . sql . parser . StatementNode stmt = parser . parseState... | org . junit . Assert . assertTrue ( ( stmt instanceof com . foundationdb . sql . parser . CreateTableNode ) ) |
testNoArg ( ) { runAllExcept ( "lambda/Lambda" , "noArg" , io . vertx . codetrans . lang . scala . ScalaLang . class , ( ) -> { "<AssertPlaceHolder>" ; io . vertx . codetrans . LambdaTest . invoked = 0 ; } ) ; } runAllExcept ( java . lang . String , java . lang . String , io . vertx . codetrans . Map , java . lang . Cl... | org . junit . Assert . assertEquals ( 1 , io . vertx . codetrans . LambdaTest . invoked ) |
readData_Exception_readAllLine ( ) { org . mockito . Mockito . when ( filereader . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( filereader . readAllLine ( org . mockito . Mockito . anyString ( ) ) ) . thenThrow ( new java . io . IOException ( "Exceptio... | org . junit . Assert . assertTrue ( ( alarmDumpsysTimestamp == null ) ) |
manageModificationProcess_VSERVER_UPDATED_VServerIsRunning ( ) { paramHandler . getIaasContext ( ) . setVSystemStatus ( "NORMAL" ) ; doReturn ( VServerStatus . RUNNING ) . when ( vServerProcessor . vserverComm ) . getVServerStatus ( any ( org . oscm . app . iaas . PropertyHandler . class ) ) ; org . oscm . app . iaas .... | org . junit . Assert . assertNull ( newState ) |
testNoFrontendUrlWithMultipleUrlIpport ( ) { java . util . Map < java . net . URI , java . net . URI > ipports = new java . util . HashMap ( ) ; ipports . put ( com . vsct . supervision . notification . model . AlarmMapperTest . DEFAULT_GRAPHITE_URL , com . vsct . supervision . notification . model . AlarmMapperTest . ... | org . junit . Assert . assertEquals ( com . vsct . supervision . notification . model . AlarmMapperTest . OTHER_GRAPHITE_IPPORT , backendAlarm . getGraphiteBaseUrl ( ) ) |
testToEditOneLine ( ) { com . horstmann . violet . product . diagram . property . text . MultiLineText multiLineText = new com . horstmann . violet . product . diagram . property . text . MultiLineText ( ) ; multiLineText . setText ( "<b><<test>></b>" ) ; "<AssertPlaceHolder>" ; } toEdit ( ) { return getOneLineString (... | org . junit . Assert . assertEquals ( "<b><<test>></b>" , multiLineText . toEdit ( ) ) |
getExtension ( ) { org . phenotips . configuration . RecordSection s = new org . phenotips . configuration . spi . UIXRecordSection ( this . uiExtension , this . uixManager , this . orderFilter ) ; "<AssertPlaceHolder>" ; } getExtension ( ) { org . phenotips . configuration . RecordElement s = new org . phenotips . con... | org . junit . Assert . assertSame ( this . uiExtension , s . getExtension ( ) ) |
should_map_short_to_short ( ) { com . github . erchu . beancp . commons . NumberConvertersTest . Source sourceInstance = new com . github . erchu . beancp . commons . NumberConvertersTest . Source ( ) ; sourceInstance . setShortValue ( ( ( short ) ( 8 ) ) ) ; com . github . erchu . beancp . Mapper mapper = new com . gi... | org . junit . Assert . assertEquals ( ( ( short ) ( 8 ) ) , result . getShortValue ( ) ) |
testConvertNull ( ) { java . lang . Double result = underTest . convert ( null ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { if ( "S" . equalsIgnoreCase ( value ) ) { return Size . TINY ; } else if ( "M" . equalsIgnoreCase ( value ) ) { return Size . NORMAL ; } else if ( "L" . equalsIgnoreCase ( valu... | org . junit . Assert . assertNull ( result ) |
isConfirmationRequired ( ) { boolean confirmationRequired = m . isConfirmationRequired ( ) ; "<AssertPlaceHolder>" ; } isConfirmationRequired ( ) { boolean confirmationRequired = m . isConfirmationRequired ( ) ; org . junit . Assert . assertFalse ( confirmationRequired ) ; } | org . junit . Assert . assertFalse ( confirmationRequired ) |
testWriteResponseIPv6 ( ) { final nu . najt . kecon . jsocksproxy . socks5 . SocksImplementation5 implementation5 = new nu . najt . kecon . jsocksproxy . socks5 . SocksImplementation5 ( null , null , null ) ; final java . io . ByteArrayOutputStream byteArrayOutputStream = new java . io . ByteArrayOutputStream ( ) ; fin... | org . junit . Assert . assertArrayEquals ( new byte [ ] { 5 , 0 , 0 , 4 , 10 , 11 , 12 , 13 , 10 , 11 , 12 , 13 , 10 , 11 , 12 , 13 , 10 , 11 , 12 , 13 , 0 , 80 } , byteArrayOutputStream . toByteArray ( ) ) |
testIsNetworksOverlapWithEmptyValues ( ) { "<AssertPlaceHolder>" ; } isNetworksOverlap ( java . lang . String , java . lang . String ) { try { final java . lang . Long [ ] cidrALong = com . cloud . utils . net . NetUtils . cidrToLong ( cidrA ) ; final java . lang . Long [ ] cidrBLong = com . cloud . utils . net . NetUt... | org . junit . Assert . assertEquals ( false , com . cloud . utils . net . NetUtils . isNetworksOverlap ( "" , null ) ) |
create_by_id_right_after_entity_creation_should_not_throw_exception ( ) { @ com . artemis . annotations . Wire ( injectInherited = true ) class TestSystem extends net . mostlyoriginal . api . plugin . extendedcomponentmapper . ExtendedComponentMapperPluginTest . BasicSystem { @ net . mostlyoriginal . api . plugin . ext... | org . junit . Assert . assertNotNull ( c1 ) |
testdelete ( ) { com . taobao . tdhs . jdbc . test . Connection connection = getTDHSConnection ( ) ; com . taobao . tdhs . jdbc . test . Statement statement = connection . createStatement ( ) ; int i = statement . executeUpdate ( "delete<sp>from<sp>orders<sp>where<sp>user_id<sp>=1<sp>and<sp>auction_name!=\"Book\"" ) ; ... | org . junit . Assert . assertEquals ( 3 , i ) |
testResetDiskRequest ( ) { try { com . fit2cloud . aliyun . ecs . model . request . ResetDiskRequest r = new com . fit2cloud . aliyun . ecs . model . request . ResetDiskRequest ( "d-25p39du6w" , "s-25mikyl6y" ) ; com . fit2cloud . aliyun . Response response = client . resetDisk ( r ) ; System . out . println ( ( "testR... | org . junit . Assert . assertTrue ( true ) |
testNext ( ) { java . lang . String expectedJavascript = "$('div').next('span');" ; java . lang . String generatedJavascript = new org . odlabs . wiquery . core . javascript . JsStatement ( ) . $ ( null , "div" ) . chain ( org . odlabs . wiquery . core . javascript . helper . TraversingHelper . next ( "span" ) ) . rend... | org . junit . Assert . assertEquals ( generatedJavascript , expectedJavascript ) |
remoteBlockingTimeout ( ) { org . ebayopensource . turmeric . runtime . sif . service . Service service = org . ebayopensource . turmeric . runtime . sif . service . ServiceFactory . create ( "test1" , "remote" , serverUri . toURL ( ) ) ; service . createDispatch ( "echoString" ) . invokeAsync ( ( ( ECHO_STRING ) + "se... | org . junit . Assert . assertTrue ( ( ( responseList . size ( ) ) == 0 ) ) |
testOperationWithNullFileName ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/wrong_name_operation.sl" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( new io . cloudslang . lang . compiler . SlangSource (... | org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) ) |
testPrivateKey ( ) { com . streamsets . pipeline . lib . remote . TestFTPRemoteConnector . FTPRemoteConnectorForTest connector = new com . streamsets . pipeline . lib . remote . TestFTPRemoteConnector . FTPRemoteConnectorForTest ( getBean ( ( ( "ftp://localhost:" + ( port ) ) + "/" ) , true , false , com . streamsets .... | org . junit . Assert . assertEquals ( 1 , issues . size ( ) ) |
testNarrowedScanWithoutFilter ( ) { org . apache . hadoop . hbase . client . Scan scan = new org . apache . hadoop . hbase . client . Scan ( ) . withStartRow ( "a" . getBytes ( ) ) . withStopRow ( "z" . getBytes ( ) ) ; com . google . cloud . bigtable . hbase . adapters . read . TestScanAdapter . scanAdapter . adapt ( ... | org . junit . Assert . assertEquals ( expected , result ) |
testGetSelectedProjectId_nothingSelected ( ) { projectSelector . setProjects ( com . google . cloud . tools . eclipse . projectselector . ProjectSelectorTest . getUnsortedProjectList ( ) ) ; "<AssertPlaceHolder>" ; } getSelectedProjectId ( ) { if ( getSelection ( ) . isEmpty ( ) ) { return "" ; } com . google . cloud .... | org . junit . Assert . assertEquals ( "" , projectSelector . getSelectedProjectId ( ) ) |
identicalObjectsShouldBeEqual ( ) { java . lang . Object reference = createEqualInstance ( ) ; "<AssertPlaceHolder>" ; } createEqualInstance ( ) { return new org . infinitest . eclipse . SlowTestMarkerInfo ( org . infinitest . eclipse . WhenMarkingTestsAsSlow . TEST_NAME , new org . infinitest . eclipse . MethodStats (... | org . junit . Assert . assertEquals ( reference , reference ) |
testFilterNietTeLeverenPersonenVoorDoelbindingVerlaatPopulatie ( ) { final nl . bzk . brp . levering . model . Leveringinformatie leveringAutorisatie = maakLeveringinformatie ( SoortDienst . MUTATIELEVERING_OP_BASIS_VAN_DOELBINDING ) ; final nl . bzk . brp . levering . model . Populatie populatie = nl . bzk . brp . lev... | org . junit . Assert . assertTrue ( resultaat ) |
search_shouldFindMatchingVisitAttributeTypesExcludingRetiredOnes ( ) { org . openmrs . module . webservices . rest . SimpleObject result = deserialize ( handle ( newGetRequest ( getURI ( ) , new org . openmrs . module . webservices . rest . web . v1_0 . controller . openmrs1_9 . Parameter ( "q" , "date" ) ) ) ) ; "<Ass... | org . junit . Assert . assertEquals ( 2 , org . openmrs . module . webservices . rest . test . Util . getResultsSize ( result ) ) |
shouldDeleteLinkProps ( ) { org . openkilda . model . LinkProps linkProps = org . openkilda . model . LinkProps . builder ( ) . dstPort ( 1 ) . srcPort ( 1 ) . srcSwitchId ( org . openkilda . persistence . repositories . impl . Neo4jLinkPropsRepositoryTest . TEST_SWITCH_A_ID ) . dstSwitchId ( org . openkilda . persiste... | org . junit . Assert . assertEquals ( 0 , org . openkilda . persistence . repositories . impl . Neo4jLinkPropsRepositoryTest . linkPropsRepository . findAll ( ) . size ( ) ) |
testGetProcessedCount ( ) { final java . lang . Long count = 5L ; this . mockCtx . checking ( new org . jmock . Expectations ( ) { { oneOf ( pool ) . getResource ( ) ; will ( returnValue ( jedis ) ) ; oneOf ( jedis ) . get ( "resque:stat:processed" ) ; will ( returnValue ( java . lang . Long . toString ( count ) ) ) ; ... | org . junit . Assert . assertEquals ( count , ( ( java . lang . Long ) ( processedCount ) ) ) |
shouldSortLargeNumberOfItems ( ) { final int streamSize = 1000000 ; final int resultLimit = 10000 ; final java . util . stream . IntStream stream = new java . util . Random ( ) . ints ( ( streamSize * 2 ) ) . distinct ( ) . limit ( streamSize ) ; final uk . gov . gchq . gaffer . commonutil . iterable . LimitedInMemoryS... | org . junit . Assert . assertEquals ( elements , sortedElements ) |
testInit ( ) { org . apache . servicecomb . provider . pojo . instance . PojoInstanceFactory lPojoInstanceFactory = new org . apache . servicecomb . provider . pojo . instance . PojoInstanceFactory ( ) ; lPojoInstanceFactory . create ( "org.apache.servicecomb.provider.pojo.instance.TestPojoInstanceFactory" ) ; "<Assert... | org . junit . Assert . assertEquals ( PojoConst . POJO , lPojoInstanceFactory . getImplName ( ) ) |
testShouldIssueClickEvents ( ) { driver . get ( pages . javascriptPage ) ; driver . findElement ( org . openqa . selenium . By . id ( "mouseclick" ) ) . click ( ) ; org . openqa . selenium . WebElement result = driver . findElement ( org . openqa . selenium . By . id ( "result" ) ) ; wait . until ( org . openqa . selen... | org . junit . Assert . assertThat ( result . getText ( ) , org . hamcrest . Matchers . equalTo ( "mouse<sp>click" ) ) |
testSetDescription ( ) { java . lang . String description = "description" ; java . lang . String expected = "description" ; org . owasp . dependencycheck . xml . pom . Model instance = new org . owasp . dependencycheck . xml . pom . Model ( ) ; instance . setDescription ( description ) ; "<AssertPlaceHolder>" ; } getDe... | org . junit . Assert . assertEquals ( expected , instance . getDescription ( ) ) |
synchronizedEach ( ) { org . eclipse . collections . api . list . MutableList < java . lang . Integer > integers = org . eclipse . collections . impl . list . Interval . oneTo ( 10 ) . toList ( ) ; integers . add ( null ) ; org . eclipse . collections . api . list . MutableList < java . lang . Integer > result = Lists ... | org . junit . Assert . assertEquals ( result , integers ) |
testEPS ( ) { com . github . mbhk . barcode4j . Configuration cfg = new com . github . mbhk . barcode4j . Configuration ( "cfg" ) ; cfg . addChild ( new com . github . mbhk . barcode4j . Configuration ( "intl2of5" ) ) ; org . krysalis . barcode4j . BarcodeUtil util = org . krysalis . barcode4j . BarcodeUtil . getInstan... | org . junit . Assert . assertTrue ( ( ( baout . size ( ) ) > 0 ) ) |
testValidateFieldsNotValid ( ) { java . util . List < de . akquinet . engineering . vaadinator . timesheet . ui . std . presenter . TimesheetDayEntryChangePresenterEx > entryPresenters = new java . util . ArrayList < de . akquinet . engineering . vaadinator . timesheet . ui . std . presenter . TimesheetDayEntryChangePr... | org . junit . Assert . assertFalse ( res ) |
createHeaderSymlinkTreeBuildRuleHasNoDeps ( ) { com . facebook . buck . core . rules . ActionGraphBuilder graphBuilder = new com . facebook . buck . core . rules . resolver . impl . TestActionGraphBuilder ( ) ; com . facebook . buck . io . filesystem . impl . FakeProjectFilesystem filesystem = new com . facebook . buck... | org . junit . Assert . assertTrue ( symlinkTree . getBuildDeps ( ) . isEmpty ( ) ) |
tree_iter_2_08 ( ) { int [ ] keys = new int [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ; org . apache . jena . dboe . index . RangeIndex rIndex = makeRangeIndex ( 2 ) ; org . apache . jena . dboe . index . test . IndexTestLib . add ( rIndex , keys ) ; java . util . List < java . lang . Integer > x = toIntList ( rIndex .... | org . junit . Assert . assertEquals ( expected , x ) |
testSetMaxRowsHigherThanSystemLimit ( ) { int sysValueToSet = ( org . apache . drill . jdbc . PreparedStatementMaxRowsTest . RANDOMIZER . nextInt ( 5 ) ) + 6 ; setSystemMaxRows ( sysValueToSet ) ; try ( java . sql . PreparedStatement pStmt = org . apache . drill . jdbc . PreparedStatementMaxRowsTest . connection . prep... | org . junit . Assert . assertEquals ( sysValueToSet , rowCount ) |
computesValidAllFeaturesPoints ( ) { model = new com . metservice . kanban . charts . burnup . EstimatesBurnDownDataModel ( workItems , estimatesProject ) ; "<AssertPlaceHolder>" ; } computeAllFeaturePoints ( ) { int points = 0 ; for ( com . metservice . kanban . model . WorkItem wi : workItems ) { points += wi . getAv... | org . junit . Assert . assertEquals ( 8 , model . computeAllFeaturePoints ( ) ) |
testInsertUpdateAndDelete ( ) { com . wipro . ats . bdre . md . dao . AppDeploymentQueueStatus adqStatus = new com . wipro . ats . bdre . md . dao . AppDeploymentQueueStatus ( ) ; adqStatus . setDescription ( "Merged" ) ; adqStatus . setAppDeploymentStatusId ( ( ( short ) ( 3 ) ) ) ; java . lang . Short adqId = appDepl... | org . junit . Assert . assertEquals ( "updated<sp>Merged" , adqStatus . getDescription ( ) ) |
test_Line ( ) { org . eclipse . gef . geometry . planar . Line line = new org . eclipse . gef . geometry . planar . Line ( ( - 10 ) , ( - 20 ) , 30 , 40 ) ; java . awt . geom . Line2D . Double lineAWT = org . eclipse . gef . geometry . convert . awt . Geometry2AWT . toAWTLine ( line ) ; "<AssertPlaceHolder>" ; } toLine... | org . junit . Assert . assertEquals ( line , org . eclipse . gef . geometry . convert . awt . AWT2Geometry . toLine ( lineAWT ) ) |
testCaptureNone ( ) { org . easymock . Capture < java . lang . Integer > captured = testCaptureType ( CaptureType . NONE ) ; "<AssertPlaceHolder>" ; } hasCaptured ( ) { return ! ( values . isEmpty ( ) ) ; } | org . junit . Assert . assertFalse ( captured . hasCaptured ( ) ) |
testConvertFoo ( ) { java . lang . Short result = underTest . convert ( "foo" ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { if ( "S" . equalsIgnoreCase ( value ) ) { return Size . TINY ; } else if ( "M" . equalsIgnoreCase ( value ) ) { return Size . NORMAL ; } else if ( "L" . equalsIgnoreCase ( value... | org . junit . Assert . assertNull ( result ) |
test1 ( ) { final int _SIZE = 1 ; org . cache2k . Cache < java . lang . Integer , java . lang . Integer > c = provideCache ( _SIZE ) ; for ( int i = 0 ; i < ( _SIZE * 2 ) ; i ++ ) { c . put ( i , i ) ; } for ( int i = 0 ; i < ( _SIZE * 2 ) ; i ++ ) { c . put ( i , i ) ; } int _count = 0 ; for ( int k : c . keys ( ) ) {... | org . junit . Assert . assertEquals ( _SIZE , _count ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.