input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
decode_2 ( ) { final java . lang . String arg = "f" ; final java . lang . String exp = "Zg==" ; "<AssertPlaceHolder>" ; } decode ( byte [ ] ) { if ( ( data . length ) == 0 ) { return data ; } int lastRealDataIndex = ( data . length ) - 1 ; while ( ( data [ lastRealDataIndex ] ) == ( org . erlide . util . Base64 . EQUAL... | org . junit . Assert . assertEquals ( arg , new java . lang . String ( org . erlide . util . Base64 . decode ( exp . getBytes ( ) ) ) ) |
testBuildWithDisabledSecurityConstraint ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . salary . type . SalaryType context = new org . lnu . is . domain . salary . type . SalaryType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>SalaryType<sp>e<sp>WHERE<sp>e.status=:status<sp>" ; org ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
test2SetFloat ( ) { float expected = 1.2F ; conf . setFloat ( "test2" , expected ) ; float actual = conf . getFloat ( "test2" ) ; "<AssertPlaceHolder>" ; } getFloat ( java . lang . String ) { java . lang . String value = get ( name ) ; if ( org . apache . commons . lang . StringUtils . isNotBlank ( value ) ) { return j... | org . junit . Assert . assertEquals ( expected , actual , 0 ) |
testDatetimeField ( ) { java . lang . String value = "2013-06-12<sp>12:30:11" ; org . fastcatsearch . ir . field . DatetimeField field = new org . fastcatsearch . ir . field . DatetimeField ( "A" , value ) ; org . fastcatsearch . ir . io . BytesDataInput input = write ( field ) ; org . fastcatsearch . ir . field . Date... | org . junit . Assert . assertEquals ( value , value2 ) |
getMonthReservationsAllUsers ( ) { final org . silverpeas . resourcesmanager . web . ReservationEntity [ ] entities = getAt ( ( ( aMonthReservationResourceBaseURI ( ) ) + "/month/2013/02/14" ) , org . silverpeas . resourcesmanager . web . ReservationEntity [ ] . class ) ; "<AssertPlaceHolder>" ; } aMonthReservationReso... | org . junit . Assert . assertNotNull ( entities ) |
createInternalPublicationTest ( ) { System . out . println ( "PublicationManagerIntegrationTest.createInternalPublicationTest" ) ; cz . metacentrum . perun . cabinet . model . Publication p = new cz . metacentrum . perun . cabinet . model . Publication ( ) ; p . setCategoryId ( publicationOne . getCategoryId ( ) ) ; p ... | org . junit . Assert . assertTrue ( ( ( p . getId ( ) ) > 0 ) ) |
testReturnsPayloadWhenMatchesIfNoCaptureGroupDefined ( ) { addMessageToContextWithPayload ( "TESTfooTEST" ) ; java . lang . Object result = regexFuntion . call ( new java . lang . Object [ ] { "TEST\\w+TEST" } , context ) ; "<AssertPlaceHolder>" ; } call ( java . lang . Object [ ] , org . mule . runtime . api . el . Bi... | org . junit . Assert . assertEquals ( "TESTfooTEST" , result ) |
testConvertAll ( ) { java . lang . Long id = 1L ; java . lang . String abbrName = "abbr<sp>Name" ; java . lang . String name = "n<sp>a<sp>m<sp>e" ; org . lnu . is . domain . honors . type . HonorType source = new org . lnu . is . domain . honors . type . HonorType ( ) ; source . setId ( id ) ; source . setAbbrName ( ab... | org . junit . Assert . assertEquals ( expecteds , actuals ) |
testNullTemplate ( ) { final java . lang . String result = templater . execute ( null , "test" , java . util . Collections . emptyMap ( ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNull ( result ) |
testGetSplits ( ) { org . apache . mahout . text . doc . SingleFieldDocument doc1 = new org . apache . mahout . text . doc . SingleFieldDocument ( "1" , "This<sp>is<sp>simple<sp>document<sp>1" ) ; org . apache . mahout . text . doc . SingleFieldDocument doc2 = new org . apache . mahout . text . doc . SingleFieldDocumen... | org . junit . Assert . assertEquals ( 3 , splits . size ( ) ) |
testFindByHash ( ) { java . util . List < org . kaaproject . kaa . common . dto . TopicDto > topics = new java . util . ArrayList ( ) ; org . kaaproject . kaa . common . dto . TopicDto topicDto = new org . kaaproject . kaa . common . dto . TopicDto ( ) ; topicDto . setId ( "6123" ) ; topics . add ( topicDto ) ; byte [ ... | org . junit . Assert . assertEquals ( simpleHash , topicListEntry . getSimpleHash ( ) ) |
testIdentityCodingIsNotUsedInContentEncodingHeader ( ) { originResponse . setHeader ( "Content-Encoding" , "identity" ) ; backendExpectsAnyRequest ( ) . andReturn ( originResponse ) ; replayMocks ( ) ; final org . apache . hc . core5 . http . ClassicHttpResponse result = execute ( request ) ; verifyMocks ( ) ; boolean ... | org . junit . Assert . assertFalse ( foundIdentity ) |
testTrashAndRestoreWithApprovedStatusRestoreUniqueTitle ( ) { com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( group . getGroupId ( ) ) ; com . liferay . portal . kernel . model . BaseModel < ? > pare... | org . junit . Assert . assertEquals ( uniqueTitle , getUniqueTitle ( baseModel ) ) |
nrt ( ) { org . apache . jackrabbit . oak . plugins . index . lucene . TestUtil . enableIndexingMode ( builder , FulltextIndexConstants . IndexingMode . NRT ) ; org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexDefinition idxDefn = new org . apache . jackrabbit . oak . plugins . index . lucene . L... | org . junit . Assert . assertTrue ( idxDefn . isNRTIndexingEnabled ( ) ) |
testSaveState ( ) { com . streamsets . datacollector . execution . store . SlavePipelineStateStore slavePipelineStateStore = new com . streamsets . datacollector . execution . store . SlavePipelineStateStore ( ) ; slavePipelineStateStore . saveState ( "user" , "pipe1" , "1" , PipelineStatus . EDITED , "msg" , new java ... | org . junit . Assert . assertEquals ( PipelineStatus . EDITED , slavePipelineStateStore . getState ( "pipe1" , "1" ) . getStatus ( ) ) |
doesTargetStorageSupportDiskOfferingTestDiskOfferingTagsDifferentFromdStorageTags ( ) { com . cloud . storage . DiskOfferingVO diskOfferingVoMock = org . mockito . Mockito . mock ( com . cloud . storage . DiskOfferingVO . class ) ; org . mockito . Mockito . doReturn ( "A,B" ) . when ( diskOfferingVoMock ) . getTags ( )... | org . junit . Assert . assertFalse ( result ) |
level1Miss ( ) { final int i = 1 << ( ( com . zaxxer . sparsebits . SparseBitSet . SHIFT1 ) + ( com . zaxxer . sparsebits . SparseBitSet . SHIFT3 ) ) ; set . set ( i ) ; final int ret = set . previousClearBit ( i ) ; "<AssertPlaceHolder>" ; } previousClearBit ( int ) { if ( i < 0 ) { if ( i == ( - 1 ) ) return - 1 ; th... | org . junit . Assert . assertEquals ( ( i - 1 ) , ret ) |
testSerialization ( ) { org . jfree . data . time . TimePeriodValuesCollection c1 = new org . jfree . data . time . TimePeriodValuesCollection ( ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out .... | org . junit . Assert . assertEquals ( c1 , c2 ) |
testPersoonGeenIndicatieDerdeHeeftGezag ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteiten = brby2019 . voerRegelUit ( maakPersoon ( SoortIndicatie . INDICATIE_ONDER_CURATELE , 2 , nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . gezagder... | org . junit . Assert . assertTrue ( berichtEntiteiten . isEmpty ( ) ) |
testCompressOnRollover ( ) { org . junit . Assume . assumeFalse ( isWindowsEnvironment ( ) ) ; final org . apache . nifi . provenance . RepositoryConfiguration config = org . apache . nifi . provenance . ITestPersistentProvenanceRepository . createConfiguration ( ) ; config . setMaxEventFileLife ( 500 , TimeUnit . MILL... | org . junit . Assert . assertTrue ( compressedLogFile . exists ( ) ) |
getUpdateCountShouldReturnOne ( ) { org . neo4j . jdbc . bolt . BoltNeo4jPreparedStatement statement = mock ( org . neo4j . jdbc . bolt . BoltNeo4jPreparedStatement . class ) ; when ( statement . isClosed ( ) ) . thenReturn ( false ) ; when ( statement . getUpdateCount ( ) ) . thenCallRealMethod ( ) ; org . mockito . i... | org . junit . Assert . assertEquals ( 1 , statement . getUpdateCount ( ) ) |
should_return_this ( ) { org . fest . assertions . api . FileAssert returned = assertions . exists ( ) ; "<AssertPlaceHolder>" ; } exists ( ) { return exists ; } | org . junit . Assert . assertSame ( assertions , returned ) |
testEqualsObjectNotPacket ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) ) |
testDecorateEmptyText ( ) { "<AssertPlaceHolder>" ; } decorate ( java . lang . String , org . springframework . roo . support . util . AnsiEscapeCode [ ] ) { if ( org . apache . commons . lang3 . StringUtils . isEmpty ( text ) ) { return text ; } final java . lang . StringBuilder sb = new java . lang . StringBuilder ( ... | org . junit . Assert . assertEquals ( "" , org . springframework . roo . support . util . AnsiEscapeCode . decorate ( "" , org . springframework . roo . support . util . AnsiEscapeCode . values ( ) [ 0 ] ) ) |
returnNullActiveJobGraphIfJobTabNotExists ( ) { org . pentaho . di . ui . spoon . job . JobGraph actualJobGraph = spoon . getActiveJobGraph ( ) ; "<AssertPlaceHolder>" ; } getActiveJobGraph ( ) { if ( ( ( ( delegates ) != null ) && ( ( delegates . tabs ) != null ) ) && ( ( tabfolder ) != null ) ) { org . pentaho . di .... | org . junit . Assert . assertNull ( actualJobGraph ) |
distributePortsOnSide_GivenCrossOnWesternSide_ShouldRemoveCrossing ( ) { org . eclipse . elk . alg . layered . graph . LNode [ ] leftNodes = addNodesToLayer ( 2 , makeLayer ( getGraph ( ) ) ) ; org . eclipse . elk . alg . layered . graph . LNode rightNode = addNodeToLayer ( makeLayer ( getGraph ( ) ) ) ; eastWestEdgeFr... | org . junit . Assert . assertThat ( rightNode . getPorts ( ) , org . hamcrest . CoreMatchers . is ( expectedPortOrderRightNode ) ) |
testUsingLocalhost ( ) { com . liferay . portal . kernel . theme . ThemeDisplay themeDisplay = initThemeDisplay ( company , group , publicLayout , com . liferay . portal . util . VIRTUAL_HOSTNAME ) ; java . lang . String virtualHostnameFriendlyURL = com . liferay . portal . kernel . util . PortalUtil . getLayoutURL ( p... | org . junit . Assert . assertEquals ( localhostFriendlyURL , virtualHostnameFriendlyURL ) |
generate_emptyCollections_shouldGenerateList ( ) { java . util . List < com . adobe . acs . commons . wcm . comparisons . PageCompareDataLine > left = java . util . Collections . emptyList ( ) ; java . util . List < com . adobe . acs . commons . wcm . comparisons . PageCompareDataLine > right = java . util . Collection... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( java . util . Collections . < com . adobe . acs . commons . wcm . comparisons . lines . Line < com . adobe . acs . commons . wcm . comparisons . PageCompareDataLine > > emptyList ( ) ) ) |
writeInt ( ) { final byte [ ] data = new byte [ ] { 4 , 3 , 2 , 1 } ; final java . io . ByteArrayOutputStream stream = new java . io . ByteArrayOutputStream ( ) ; final com . flagstone . transform . coder . SWFEncoder encoder = new com . flagstone . transform . coder . SWFEncoder ( stream ) ; encoder . writeInt ( 16909... | org . junit . Assert . assertArrayEquals ( data , stream . toByteArray ( ) ) |
testFindProductAvailableToSellQuantityProduct5AccSHOP50 ( ) { final java . util . List < org . yes . cart . domain . entity . Warehouse > shop10wh = warehouseService . getByShopId ( 50L , false ) ; java . util . Map < java . lang . String , java . math . BigDecimal > skusWarehouse = skuWarehouseService . getProductAvai... | org . junit . Assert . assertEquals ( 0 , skusWarehouse . size ( ) ) |
testNestedParameterResolversAreOrdered ( ) { final org . axonframework . messaging . annotation . MultiParameterResolverFactoryTest . LowPrioParameterResolverFactory lowPrio = new org . axonframework . messaging . annotation . MultiParameterResolverFactoryTest . LowPrioParameterResolverFactory ( ) ; final org . axonfra... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( highPrio , mockFactory1 , mockFactory2 , lowPrio ) , testSubject . getDelegates ( ) ) |
testGetConfiguration ( ) { org . apache . ambari . server . view . configuration . InstanceConfig instanceConfig = org . apache . ambari . server . view . configuration . InstanceConfigTest . getInstanceConfigs ( ) . get ( 0 ) ; org . apache . ambari . server . orm . entities . ViewEntity viewDefinition = org . apache ... | org . junit . Assert . assertEquals ( instanceConfig , viewInstanceDefinition . getConfiguration ( ) ) |
testSearch ( ) { java . util . Date desapriskDate1 = new java . util . Date ( dfm . parse ( "20060101" ) . getTime ( ) ) ; java . util . Date desapriskDate2 = new java . util . Date ( dfm . parse ( "20050101" ) . getTime ( ) ) ; java . util . Date desapriskDate3 = new java . util . Date ( dfm . parse ( "20070101" ) . g... | org . junit . Assert . assertEquals ( expectedResult , result ) |
testForName_Inner ( ) { "<AssertPlaceHolder>" ; } forName ( java . lang . String ) { return net . greghaines . jesque . utils . ReflectionUtils . forName ( name , net . greghaines . jesque . utils . ReflectionUtils . getDefaultClassLoader ( ) ) ; } | org . junit . Assert . assertSame ( java . util . Map . Entry . class , net . greghaines . jesque . utils . ReflectionUtils . forName ( java . util . Map . Entry . class . getName ( ) ) ) |
shouldOrderRunningFirst ( ) { java . util . List < org . talend . dataprep . async . AsyncExecution > unOrderedAsyncs = com . google . common . collect . Lists . newArrayList ( buildAsyncExecution ( AsyncExecution . Status . NEW , 100L ) , buildAsyncExecution ( AsyncExecution . Status . DONE , 100L ) , buildAsyncExecut... | org . junit . Assert . assertEquals ( AsyncExecution . Status . RUNNING , unOrderedAsyncs . get ( 0 ) . getStatus ( ) ) |
testRemoveElementAt ( ) { v . add ( org . apache . tools . ant . util . VectorSetTest . O ) ; v . removeElementAt ( 0 ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( isReference ( ) ) { return getRef ( ) . size ( ) ; } dieOnCircularReference ( ) ; return streamArchives ( ) . mapToInt ( ArchiveFileSet :: size ) . sum ( ) ... | org . junit . Assert . assertEquals ( 0 , v . size ( ) ) |
testSetDate ( ) { org . esa . snap . core . datamodel . Product product = new org . esa . snap . core . datamodel . Product ( "name" , "type" , 10 , 10 ) ; com . bc . calvalus . processing . beam . CalvalusProductIO . setDateToMerisSdrProduct ( product , "CCI-Fire-MERIS-SDR-L3-300m-v1.0-2008-12-07-v04h07.nc" ) ; long e... | org . junit . Assert . assertEquals ( expected , actual ) |
test_VisibilityWindowListener_multiple_shells ( ) { java . util . concurrent . atomic . AtomicBoolean secondChildCompleted = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; java . util . concurrent . atomic . AtomicInteger childCount = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; brow... | org . junit . Assert . assertTrue ( errMsg , passed ) |
testGetFileCharset_BIG5 ( ) { java . io . File file = org . apache . commons . io . FileUtils . toFile ( CLASS . getResource ( "chinese-gb18030.srt" ) ) ; "<AssertPlaceHolder>" . isEqualTo ( net . pms . util . CHARSET_GB18030 ) ; } getFileCharsetName ( net . pms . util . File ) { if ( file == null ) { return null ; } c... | org . junit . Assert . assertThat ( net . pms . util . FileUtil . getFileCharsetName ( file ) ) |
test ( ) { mapper = new io . gravitee . management . services . dynamicproperties . provider . http . mapper . JoltMapper ( read ( "/jolt/specification.json" ) ) ; java . lang . String input = org . apache . commons . io . IOUtils . toString ( read ( "/jolt/custom-response.json" ) , java . nio . charset . Charset . def... | org . junit . Assert . assertFalse ( properties . isEmpty ( ) ) |
testDoesNotMeetArchitectureRequirements ( ) { org . rioproject . monitor . service . ProvisionRequest request = createProvisionRequest ( ) ; request . getServiceElement ( ) . setServiceLevelAgreements ( createServiceLevelAgreements ( false , true ) ) ; java . util . Collection < org . rioproject . monitor . service . S... | org . junit . Assert . assertTrue ( ( ( notSupported . size ( ) ) > 0 ) ) |
testWrite_02 ( ) { filterStream . write ( ( "<sp>*<sp>$Id" + "$" ) . getBytes ( ) ) ; filterStream . flush ( ) ; java . lang . String res = new java . lang . String ( result . toByteArray ( ) ) ; java . lang . String expected = "" ; "<AssertPlaceHolder>" ; } toByteArray ( ) { return this . buf ; } | org . junit . Assert . assertEquals ( expected , res ) |
testAddSongFileNoEvent ( ) { when ( playlistProperties . getLoad ( ) ) . thenReturn ( realPlaylistProperties . getLoad ( ) ) ; when ( serverStatus . getPlaylistVersion ( ) ) . thenReturn ( ( - 1 ) ) ; final org . bff . javampd . playlist . PlaylistChangeEvent [ ] changeEvent = new org . bff . javampd . playlist . Playl... | org . junit . Assert . assertNull ( changeEvent [ 0 ] ) |
testCreateDropTempTableWithConstraintsDerby ( ) { final java . lang . String tmpCreate = "DECLARE<sp>GLOBAL<sp>TEMPORARY<sp>TABLE<sp>%s.%s<sp>%s<sp>not<sp>logged<sp>on<sp>commit<sp>preserve<sp>rows" ; java . sql . Connection connection = methodWatcher . createConnection ( ) ; try { com . splicemachine . derby . test . ... | org . junit . Assert . assertEquals ( 5 , com . splicemachine . derby . test . framework . SpliceUnitTest . resultSetSize ( resultSet ) ) |
testConfigure ( ) { org . pentaho . reporting . engine . classic . core . modules . gui . base . PreviewPane reportPane = mock ( org . pentaho . reporting . engine . classic . core . modules . gui . base . PreviewPane . class ) ; doReturn ( 5.5 ) . when ( reportPane ) . getZoom ( ) ; doReturn ( new double [ ] { 5.0 , 5... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( true ) ) ) |
countFuturesWithResultWithTimeoutTest ( ) { java . util . List < org . threadly . concurrent . future . ListenableFuture < java . lang . Boolean > > futures = new java . util . ArrayList ( ( ( TEST_QTY ) * 2 ) ) ; for ( int i = 0 ; i < ( ( TEST_QTY ) * 2 ) ; i ++ ) { futures . add ( org . threadly . concurrent . future... | org . junit . Assert . assertEquals ( org . threadly . concurrent . future . TEST_QTY , org . threadly . concurrent . future . FutureUtils . countFuturesWithResult ( futures , false , 100 ) ) |
shouldNotSeeNodeThatWasDeletedInTransaction ( ) { long nodeID = createNode ( ) ; try ( org . neo4j . graphdb . Transaction ignore = graphDatabaseAPI . beginTx ( ) ) { org . neo4j . kernel . api . KernelTransaction ktx = ktx ( ) ; ktx . dataWrite ( ) . nodeDelete ( nodeID ) ; try ( org . neo4j . internal . kernel . api ... | org . junit . Assert . assertFalse ( cursor . next ( ) ) |
testLongToInt ( ) { final java . lang . String drl1 = ( ( ( ( ( "import<sp>" + ( org . drools . modelcompiler . TypeCoercionTest . LongHolder . class . getCanonicalName ( ) ) ) + ";\n" ) + "rule<sp>R<sp>when\n" ) + "<sp>LongHolder(<sp>value<sp>==<sp>80<sp>)\n" ) + "then\n" ) + "end\n" ; org . kie . api . runtime . KieS... | org . junit . Assert . assertEquals ( 1 , ksession . fireAllRules ( ) ) |
testTimer ( ) { com . vladmihalcea . flexypool . metric . codahale . CodahaleMetrics codahaleMetrics = new com . vladmihalcea . flexypool . metric . codahale . CodahaleMetrics ( configurationProperties , reservoirFactory ) ; when ( reservoirFactory . newInstance ( com . vladmihalcea . flexypool . metric . Timer . class... | org . junit . Assert . assertNotNull ( timer ) |
testInvokerWithSuperclass ( ) { net . neoremind . dynamicproxy . sample . Echo echo = factory . createInvokerProxy ( new net . neoremind . dynamicproxy . invoke . NullInvoker ( ) , new java . lang . Class [ ] { net . neoremind . dynamicproxy . sample . Echo . class , net . neoremind . dynamicproxy . sample . EchoImpl .... | org . junit . Assert . assertTrue ( ( echo instanceof net . neoremind . dynamicproxy . sample . EchoImpl ) ) |
createTableAs3 ( ) { makeSeparateAIS ( ) ; java . lang . String sql = "CREATE<sp>TABLE<sp>t1<sp>AS<sp>(SELECT<sp>c1,<sp>c2,<sp>c3<sp>FROM<sp>t2)<sp>WITH<sp>NO<sp>DATA" ; createTableAsCGenerateAIS ( ) ; com . foundationdb . sql . parser . StatementNode stmt = parser . parseStatement ( sql ) ; "<AssertPlaceHolder>" ; jav... | org . junit . Assert . assertTrue ( ( stmt instanceof com . foundationdb . sql . parser . CreateTableNode ) ) |
testGetDescription ( ) { "<AssertPlaceHolder>" ; } getDescription ( ) { return this . description ; } | org . junit . Assert . assertEquals ( description , filter . getDescription ( ) ) |
buildFromNodeEntity ( ) { org . openstreetmap . osmosis . core . domain . v0_6 . Node node = mock ( org . openstreetmap . osmosis . core . domain . v0_6 . Node . class ) ; when ( node . getId ( ) ) . thenReturn ( 1L ) ; java . util . List < org . openstreetmap . osmosis . core . domain . v0_6 . Tag > tags = new java . ... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldFindEhourHome ( ) { net . rrm . ehour . appconfig . EhourHomeUtil . setEhourHome ( "src/test/resources/home" ) ; net . rrm . ehour . appconfig . EhourHomeFinder . fixEhourHome ( ) ; "<AssertPlaceHolder>" ; } getEhourHome ( ) { java . lang . String eHourHome = java . lang . System . getProperty ( net . rrm . ehour... | org . junit . Assert . assertEquals ( "src/test/resources/home" , net . rrm . ehour . appconfig . EhourHomeUtil . getEhourHome ( ) ) |
testMatchWithNoSchema ( ) { org . sonar . plugins . tsql . coverage . CoveredLinesReport [ ] lines = sut . match ( "[tes<sp>t].sql" , "src" , com . google . common . collect . ImmutableMap . of ( "dbo.test" , new org . sonar . plugins . tsql . coverage . CoveredLinesReport ( "[dbo].[test]" ) , "other.test" , new org . ... | org . junit . Assert . assertEquals ( 2 , lines . length ) |
readData_NoFile ( ) { org . mockito . Mockito . when ( filereader . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( false ) ; java . util . List < com . att . aro . core . peripheral . pojo . TemperatureEvent > listTemperatureEvent = traceDataReader . readData ( traceFolder , 0.0 ) ; "<AssertPlac... | org . junit . Assert . assertEquals ( 0 , listTemperatureEvent . size ( ) , 0 ) |
Property ( ) { java . lang . String testENTITY = "testEntity" ; org . odata4j . edm . EdmEntityType . Builder entityType = EntityType ( testENTITY ) ; java . util . List < org . odata4j . edm . EdmComplexType . Builder > cpBuilderList = new java . util . ArrayList < org . odata4j . edm . EdmComplexType . Builder > ( ) ... | org . junit . Assert . assertEquals ( 1 , errors . size ( ) ) |
shouldFailWebSocketConnectionWhenServerSendOpcode14Frame ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . kaazing . gateway . transport . test . Expectations ( ) { { oneOf ( handler ) . ses... | org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) ) |
falsePositiveMetaClass ( ) { org . sonar . plugins . delphi . pmd . DelphiUnitBuilderTest builder = new org . sonar . plugins . delphi . pmd . DelphiUnitBuilderTest ( ) ; builder . appendDecl ( "type" ) ; builder . appendDecl ( "<sp>TMyClass<sp>=<sp>class" ) ; builder . appendDecl ( "<sp>end;" ) ; builder . appendDecl ... | org . junit . Assert . assertThat ( toString ( issues ) , issues , is ( empty ( ) ) ) |
testProtocoloGetLinhaGetNull ( ) { br . com . senacrs . alp . aulas . trabalho12 . ProtocoloGet obj = null ; try { obj = new br . com . senacrs . alp . aulas . trabalho12 . ProtocoloGet ( null , br . com . senacrs . alp . aulas . trabalho12 . ProtocoloGetTest . HOST_WWW_EXAMPLE_COM ) ; org . junit . Assert . fail ( jav... | org . junit . Assert . assertTrue ( true ) |
testEquals_after ( ) { final org . apache . rya . api . function . temporal . EqualsTemporalInstant function = new org . apache . rya . api . function . temporal . EqualsTemporalInstant ( ) ; final org . eclipse . rdf4j . model . Value [ ] args = new org . eclipse . rdf4j . model . Value [ 2 ] ; args [ 0 ] = org . apac... | org . junit . Assert . assertEquals ( org . apache . rya . api . function . temporal . EqualsTemporalFunctionsTest . VF . createLiteral ( false ) , rez ) |
testVarintCorrect ( ) { int numtests = 1000 ; java . util . Random r = new java . util . Random ( 0 ) ; for ( int i = 0 ; i < 5 ; i ++ ) { int min = ( ( int ) ( java . lang . Math . pow ( 2 , ( 7 * i ) ) ) ) ; int max = ( ( int ) ( java . lang . Math . min ( Integer . MAX_VALUE , java . lang . Math . pow ( 2 , ( 7 * ( ... | org . junit . Assert . assertEquals ( value , brown . tracingplane . atomlayer . ProtobufVarint . readRawVarint32 ( b ) ) |
test_ ( ) { cfvbaibai . cardfantasy . test . func . SkillTestContext context = prepare ( 50 , 50 , "" ) ; context . addToField ( 0 , 0 ) ; cfvbaibai . cardfantasy . engine . Field fieldA = context . getPlayer ( 0 ) . getField ( ) ; context . startGame ( ) ; context . proceedOneRound ( ) ; "<AssertPlaceHolder>" ; } size... | org . junit . Assert . assertEquals ( 1 , fieldA . size ( ) ) |
testMembers ( ) { no . tv2 . serf . client . SerfClientIT . logger . info ( "testMembers" ) ; System . out . println ( "testMembers" ) ; client1 . join ( com . google . common . collect . ImmutableList . < java . lang . String > of ( ( ( ( no . tv2 . serf . client . SerfClientIT . SERF2_IP ) + ":" ) + ( no . tv2 . serf... | org . junit . Assert . assertEquals ( 2 , response . getMembers ( ) . size ( ) ) |
testNullReturnedOnClosedParserOnNextFieldName ( ) { "<AssertPlaceHolder>" ; } nextFieldName ( ) { return ( nextToken ( ) ) == ( com . fasterxml . jackson . core . JsonToken . FIELD_NAME ) ? currentName ( ) : null ; } | org . junit . Assert . assertNull ( parser . nextFieldName ( ) ) |
combinationReaderTest ( ) { org . apache . uima . collection . CollectionReaderDescription reader = org . apache . uima . fit . factory . CollectionReaderFactory . createReaderDescription ( org . dkpro . similarity . uima . io . PlainTextCombinationReader . class , PlainTextCombinationReader . PARAM_INPUT_DIR , "classp... | org . junit . Assert . assertEquals ( 2 , i ) |
testToString ( ) { "<AssertPlaceHolder>" ; } toString ( ) { return "MongoEntity<sp>" + ( entityId ) ; } | org . junit . Assert . assertTrue ( ( ! ( "" . equals ( param . toString ( ) ) ) ) ) |
testSupportsRestart ( ) { "<AssertPlaceHolder>" ; } supportsRestart ( ) { return true ; } | org . junit . Assert . assertTrue ( operation . supportsRestart ( ) ) |
testSpecificSerializeDeserializeFromSchema ( ) { final org . apache . flink . api . java . tuple . Tuple3 < java . lang . Class < ? extends org . apache . avro . specific . SpecificRecord > , org . apache . avro . specific . SpecificRecord , org . apache . flink . types . Row > testData = org . apache . flink . formats... | org . junit . Assert . assertEquals ( testData . f2 , actual ) |
testBuildWithOrderBy ( ) { org . lnu . is . domain . admin . unit . AdminUnit context = new org . lnu . is . domain . admin . unit . AdminUnit ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "identifier" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu ... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
indexDefnStorafe ( ) { java . util . Map < java . lang . String , java . lang . Object > config = getDefaultConfig ( ) ; config . put ( "disableStoredIndexDefinition" , true ) ; org . apache . sling . testing . mock . osgi . MockOsgi . activate ( service , context . bundleContext ( ) , config ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertTrue ( org . apache . jackrabbit . oak . plugins . index . search . IndexDefinition . isDisableStoredIndexDefinition ( ) ) |
testConvertProvideAndRegisterDocumentSet ( ) { org . openehealth . ipf . platform . camel . ihe . xds . core . converters . ProvideAndRegisterDocumentSet org = org . openehealth . ipf . commons . ihe . xds . core . SampleData . createProvideAndRegisterDocumentSet ( ) ; org . openehealth . ipf . commons . ihe . xds . co... | org . junit . Assert . assertEquals ( org , copy ) |
testSerialization2 ( ) { eu . europa . esig . dss . MockSignatureParameters testObj = new eu . europa . esig . dss . MockSignatureParameters ( ) ; testObj . setSignatureLevel ( SignatureLevel . XAdES_BASELINE_B ) ; testObj . setSignaturePackaging ( SignaturePackaging . DETACHED ) ; testObj . setSignWithExpiredCertifica... | org . junit . Assert . assertEquals ( testObj , unserialized ) |
parseFunctionAnyParameters1 ( ) { java . util . List < java . lang . Object > parameters = org . diirt . datasource . util . FunctionParser . parseFunctionAnyParameter ( "foo(1.0)" ) ; "<AssertPlaceHolder>" ; } parseFunctionAnyParameter ( java . lang . String ) { return org . diirt . datasource . util . FunctionParser ... | org . junit . Assert . assertThat ( parameters , org . hamcrest . CoreMatchers . equalTo ( java . util . Arrays . asList ( ( ( java . lang . Object ) ( "foo" ) ) , 1.0 ) ) ) |
test_custom_host ( ) { serviceApi = new threescale . v3 . api . impl . ServiceApiDriver ( "1234abcd" , "example.com" ) ; "<AssertPlaceHolder>" ; } getHost ( ) { return host ; } | org . junit . Assert . assertEquals ( "example.com" , serviceApi . getHost ( ) ) |
testCalculatePadding ( ) { "<AssertPlaceHolder>" ; } calculatePadding ( int ) { return new byte [ 0 ] ; } | org . junit . Assert . assertArrayEquals ( record . calculatePadding ( 10 ) , new byte [ 0 ] ) |
testGetDateString ( ) { java . lang . String expected = "2059-11-31" ; java . lang . String results = org . sagebionetworks . logging . s3 . LogKeyUtils . getDateString ( 2059 , 11 , 31 ) ; "<AssertPlaceHolder>" ; } getDateString ( int , int , int ) { return java . lang . String . format ( org . sagebionetworks . loggi... | org . junit . Assert . assertEquals ( expected , results ) |
replace_3arg_NullValue2 ( ) { try { "<AssertPlaceHolder>" ; org . junit . Assert . fail ( "should<sp>have<sp>thrown<sp>an<sp>exception<sp>-<sp>null<sp>value<sp>not<sp>allowed" ) ; } catch ( java . lang . NullPointerException e ) { } } replace ( K , V , V ) { return new Semantic . UpdateExisting < K , V , java . lang . ... | org . junit . Assert . assertFalse ( cache . replace ( 1L , "1" , null ) ) |
testHttpSpnegoChallenge ( ) { org . apache . hadoop . security . UserGroupInformation . loginUserFromKeytab ( clientPrincipal , keytabFile . getCanonicalPath ( ) ) ; java . lang . String challenge = org . apache . hadoop . yarn . client . util . YarnClientUtils . generateToken ( "localhost" ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertNotNull ( challenge ) |
testLastIndexAppended ( ) { try ( net . openhft . chronicle . queue . impl . single . ChronicleQueue chronicle = builder ( getTmpDir ( ) , this . wireType ) . build ( ) ) { net . openhft . chronicle . queue . impl . single . ExcerptAppender appender = chronicle . acquireAppender ( ) ; appender . writeDocument ( ( w ) -... | org . junit . Assert . assertEquals ( nextIndexToWrite , appender . lastIndexAppended ( ) ) |
testWidgetTypesExport ( ) { org . nuxeo . ecm . platform . forms . layout . api . WidgetTypeDefinition wTypeDef = service . getWidgetTypeDefinition ( WebLayoutManager . JSF_CATEGORY , "test" ) ; "<AssertPlaceHolder>" ; java . io . File file = org . nuxeo . runtime . api . Framework . createTempFile ( "widgettypes-expor... | org . junit . Assert . assertNotNull ( wTypeDef ) |
testEmpty ( ) { java . lang . String queriesXML = "<parameters></parameters>" ; tl . lin . data . map . HMapIV < java . lang . String > returned = ivory . bloomir . util . QueryUtility . loadQueries ( com . google . common . io . ByteSource . wrap ( queriesXML . getBytes ( ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { r... | org . junit . Assert . assertEquals ( returned . size ( ) , 0 ) |
testFolderUnit ( ) { org . drools . modelcompiler . drlx . CompiledUnit unit = org . drools . modelcompiler . drlx . DrlxCompiler . compileFolders ( "src/test/resources/model" , "src/test/resources/unit2" ) ; org . kie . api . runtime . rule . RuleUnitExecutor executor = unit . createExecutor ( ) ; java . lang . reflec... | org . junit . Assert . assertEquals ( 1 , executor . run ( ruleUnit ) ) |
testInjectionTargetMsgRef31 ( ) { java . util . List < java . lang . String > errors = testXMLMergeHelper ( 31 , "InjectionTargetMsgRef" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . toString ( "" ) ; } | org . junit . Assert . assertTrue ( errors . toString ( ) , errors . isEmpty ( ) ) |
testPerMinute_90s_elapse ( ) { org . joda . time . DateTime previousTime = new org . joda . time . DateTime ( 2013 , 1 , 1 , 14 , 1 , 31 ) ; org . jmxtrans . agent . QueryResult previous = new org . jmxtrans . agent . QueryResult ( "metric1" , 10 , previousTime . getMillis ( ) ) ; org . joda . time . DateTime currentTi... | org . junit . Assert . assertThat ( actualPerMinuteValue , is ( 20 ) ) |
testGeneralPunctuationCategory ( ) { java . lang . String [ ] s = new java . lang . String [ ] { "," , "!" , "\"" , "#" , "%" , "&" , "'" , "(" , ")" , "-" , "." , "/" } ; java . lang . String regexp = "\\p{P}" ; for ( int i = 0 ; i < ( s . length ) ; i ++ ) { java . util . regex . Pattern pattern = java . util . regex... | org . junit . Assert . assertTrue ( matcher . find ( ) ) |
testGetChildren ( ) { org . orbisgis . coremap . renderer . se . common . Halo h = new org . orbisgis . coremap . renderer . se . common . Halo ( ) ; "<AssertPlaceHolder>" ; } getChildren ( ) { java . util . List < org . orbisgis . coremap . renderer . se . SymbolizerNode > ls = new java . util . ArrayList < org . orbi... | org . junit . Assert . assertTrue ( ( ( h . getChildren ( ) . size ( ) ) == 2 ) ) |
testAppendObjectWithNoTitleLeavesBufferUnchanged ( ) { t1 . append ( objectWithNoTitle ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( getActionMemento ( ) . getNameParmsId ( ) ) + "#" ) + ( getNumber ( ) ) ; } | org . junit . Assert . assertEquals ( name , t1 . toString ( ) ) |
testAuthenticationExceptionPropagatedFromMetadata ( ) { metadata . failedUpdate ( time . milliseconds ( ) , new org . apache . kafka . common . errors . AuthenticationException ( "Authentication<sp>failed" ) ) ; try { consumerClient . poll ( time . timer ( Duration . ZERO ) ) ; org . junit . Assert . fail ( "Expected<s... | org . junit . Assert . assertNull ( metadata . getAndClearAuthenticationException ( ) ) |
shouldCheckIfBothExpressionsEvaluateToTrue ( ) { com . github . zafarkhaja . semver . expr . Expression left = new com . github . zafarkhaja . semver . expr . Expression ( ) { @ com . github . zafarkhaja . semver . expr . Override public boolean interpret ( com . github . zafarkhaja . semver . Version version ) { retur... | org . junit . Assert . assertTrue ( and . interpret ( null ) ) |
when_enableSplitBrainProtection_thenReturnsEnabled ( ) { com . hazelcast . jet . config . JobConfig config = new com . hazelcast . jet . config . JobConfig ( ) ; config . setSplitBrainProtection ( true ) ; "<AssertPlaceHolder>" ; } isSplitBrainProtectionEnabled ( ) { return splitBrainProtectionEnabled ; } | org . junit . Assert . assertTrue ( config . isSplitBrainProtectionEnabled ( ) ) |
testResetToCommittedOffset ( ) { org . apache . kafka . common . utils . Time time = new org . apache . kafka . common . utils . MockTime ( ) ; org . apache . kafka . clients . consumer . internals . SubscriptionState subscription = new org . apache . kafka . clients . consumer . internals . SubscriptionState ( new org... | org . junit . Assert . assertEquals ( 539L , consumer . position ( tp0 ) ) |
testParseString ( ) { java . lang . Object dbValue = ColumnTypeInfo . STRING . parseValueForDatabaseWrite ( "foo" ) ; "<AssertPlaceHolder>" ; } parseValueForDatabaseWrite ( java . lang . String ) { if ( value == null ) { return null ; } return parser . parseValueForDatabaseWrite ( value ) ; } | org . junit . Assert . assertEquals ( "foo" , dbValue ) |
testGetHeader ( ) { org . pcap4j . packet . IcmpV4SourceQuenchPacket . IcmpV4SourceQuenchHeader h = packet . getHeader ( ) ; "<AssertPlaceHolder>" ; } getUnused ( ) { return unused ; } | org . junit . Assert . assertEquals ( unused , h . getUnused ( ) ) |
getModel_Initialized ( ) { ctrl . model = mock ( org . oscm . ui . dialog . classic . deletecustomerpricemodel . DeleteCustomerPriceModelModel . class ) ; org . oscm . ui . dialog . classic . deletecustomerpricemodel . DeleteCustomerPriceModelModel m = ctrl . getModel ( ) ; "<AssertPlaceHolder>" ; verifyZeroInteraction... | org . junit . Assert . assertSame ( ctrl . model , m ) |
testSetFetchSizeOnMySQL ( ) { org . hibernate . search . spi . SearchIntegrator searchIntegrator = getExtendedSearchIntegrator ( ) ; org . hibernate . search . test . errorhandling . MockErrorHandler mockErrorHandler = org . hibernate . search . test . batchindexing . MassIndexerErrorReportingTest . getErrorHandler ( s... | org . junit . Assert . assertEquals ( null , errorMessage ) |
testContainsArrayContainer_IncludeSelf ( ) { org . roaringbitmap . Container rc = new org . roaringbitmap . RunContainer ( ) . add ( 0 , 10 ) ; org . roaringbitmap . Container subset = new org . roaringbitmap . ArrayContainer ( ) . add ( 0 , 10 ) ; "<AssertPlaceHolder>" ; } contains ( int ) { throw new java . lang . Un... | org . junit . Assert . assertTrue ( rc . contains ( subset ) ) |
testIsOnFocusModeWhenItReturnsFalse ( ) { 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 elemental2 . dom . Element dataTypeRow = mock ( elemental2 . dom . E... | org . junit . Assert . assertFalse ( view . isOnFocusMode ( ) ) |
testVoerRegelUitRegelGaatAf ( ) { final nl . bzk . brp . model . bericht . kern . PersoonBericht nieuweSituatie = new nl . bzk . brp . model . bericht . kern . PersoonBericht ( ) ; final nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl huidigeSituatie = maakPersoon ( SoortIndicatie . INDICATI... | org . junit . Assert . assertEquals ( nieuweSituatie , berichtEntiteits . get ( 0 ) ) |
injectInto ( ) { org . eclipse . collections . api . list . MutableList < java . lang . Integer > objects = org . eclipse . collections . impl . list . fixed . SingletonListTest . newWith ( 1 ) ; java . lang . Integer result = objects . injectInto ( 1 , AddFunction . INTEGER ) ; "<AssertPlaceHolder>" ; } valueOf ( K ) ... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 2 ) , result ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.