input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
getStatus ( ) { "<AssertPlaceHolder>" ; java . util . Properties param = new java . util . Properties ( ) ; com . li3huo . netty . HttpServerTest . log . info ( com . li3huo . util . HttpTool . doGetRequest ( com . li3huo . netty . HttpServerTest . urlConsole , param ) ) ; param . setProperty ( "action" , "status" ) ; ... | org . junit . Assert . assertNotNull ( com . li3huo . netty . HttpServerTest . server ) |
testContentLocation ( ) { org . eclipse . orion . server . core . metastore . ProjectInfo projectInfo = new org . eclipse . orion . server . core . metastore . ProjectInfo ( ) ; java . lang . String contentLocation = "file:/home/test/james/root" ; projectInfo . setContentLocation ( new java . net . URI ( contentLocatio... | org . junit . Assert . assertEquals ( contentLocation , projectInfo . getContentLocation ( ) . toString ( ) ) |
testParser8 ( ) { java . util . Calendar ref = java . util . Calendar . getInstance ( java . util . TimeZone . getTimeZone ( "UTC" ) ) ; ref . set ( Calendar . YEAR , 1997 ) ; java . util . Calendar cal = org . nuxeo . ecm . automation . client . model . DateParser . parse ( "1997" ) ; "<AssertPlaceHolder>" ; } get ( j... | org . junit . Assert . assertEquals ( ref . get ( Calendar . YEAR ) , cal . get ( Calendar . YEAR ) ) |
testPermit ( ) { org . batfish . datamodel . CommunityList cl = new org . batfish . datamodel . CommunityList ( org . batfish . datamodel . CommunityListTest . NAME , com . google . common . collect . ImmutableList . of ( new org . batfish . datamodel . CommunityListLine ( LineAction . PERMIT , new org . batfish . data... | org . junit . Assert . assertThat ( cl . matchCommunity ( null , org . batfish . datamodel . CommunityListTest . COMMUNITY1 ) , org . hamcrest . Matchers . equalTo ( true ) ) |
testValidateInput7 ( ) { System . out . println ( "validateInput" ) ; java . lang . String un = "geiaxarati" ; java . lang . String pw = "patates00A" ; testPackage . mockSignUp instance = new testPackage . mockSignUp ( ) ; boolean expResult = true ; boolean result = instance . validateInput7 ( un , pw ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( expResult , result ) |
REG_DWORD_getData ( ) { final byte [ ] originalData = new byte [ ] { ( ( byte ) ( 120 ) ) , ( ( byte ) ( 86 ) ) , ( ( byte ) ( 52 ) ) , ( ( byte ) ( 18 ) ) } ; final byte [ ] modifiedData = new byte [ ] { ( ( byte ) ( 18 ) ) , ( ( byte ) ( 52 ) ) , ( ( byte ) ( 86 ) ) , ( ( byte ) ( 120 ) ) } ; final com . rapid7 . cli... | org . junit . Assert . assertArrayEquals ( modifiedData , value . getData ( ) ) |
testFuncNameMatchesAccessType ( ) { java . lang . String script = "function<sp>package()<sp>{}" ; cfml . CFSCRIPTParser . ScriptBlockContext scriptStatement = parseScript ( script ) ; if ( ( fCfmlParser . getMessages ( ) . size ( ) ) > 0 ) { org . junit . Assert . fail ( ( "whoops!<sp>" + ( fCfmlParser . getMessages ( ... | org . junit . Assert . assertNotNull ( scriptStatement ) |
oneSelectLink ( ) { java . lang . String expected = "{\"all\":false,\"properties\":[],\"links\":[{\"ne_Room\":null}]}" ; java . lang . String actual = getExpandSelectTree ( "ne_Room" , null ) . toJsonString ( ) ; "<AssertPlaceHolder>" ; } toJsonString ( ) { try { java . io . StringWriter writer = new java . io . String... | org . junit . Assert . assertEquals ( expected , actual ) |
whenUsingSystemProperty_shouldReturnOS ( ) { java . lang . String expected = "Windows<sp>10" ; java . lang . String actual = os . getOperatingSystem ( ) ; "<AssertPlaceHolder>" ; } getOperatingSystem ( ) { java . lang . String os = java . lang . System . getProperty ( "os.name" ) ; System . out . println ( ( "Using<sp>... | org . junit . Assert . assertEquals ( expected , actual ) |
testCompletenessOfGlobalBaseURI ( ) { org . apache . taverna . scufl2 . api . container . WorkflowBundle wb = new org . apache . taverna . scufl2 . api . container . WorkflowBundle ( ) ; wb . setGlobalBaseURI ( new java . net . URI ( "http://www.taverna.org.uk" ) ) ; org . apache . taverna . scufl2 . validation . corre... | org . junit . Assert . assertFalse ( problem ) |
aJustCreatedDerivedAllocationIsANewObject ( ) { givenDerivedFrom ( ) ; givenConfigurationUnit ( ) ; org . libreplan . business . planner . entities . DerivedAllocation result = org . libreplan . business . planner . entities . DerivedAllocation . create ( derivedFrom , configurationUnit ) ; "<AssertPlaceHolder>" ; } is... | org . junit . Assert . assertTrue ( result . isNewObject ( ) ) |
testMergeDeleteUpdate ( ) { int [ ] [ ] sourceVals = new int [ ] [ ] { new int [ ] { 2 , 2 } , new int [ ] { 4 , 44 } , new int [ ] { 5 , 5 } , new int [ ] { 11 , 11 } } ; runStatementOnDriver ( ( ( ( "insert<sp>into<sp>" + ( Table . NONACIDORCTBL ) ) + "<sp>" ) + ( makeValuesClause ( sourceVals ) ) ) ) ; int [ ] [ ] t... | org . junit . Assert . assertEquals ( stringifyValues ( rExpected ) , r ) |
testLogSpanningMultipleFiles ( ) { int iterations = 1000 ; for ( int i = 0 ; i < iterations ; i ++ ) { boolean sync = ( ( i % 2 ) == 0 ) ? true : false ; journal . write ( java . nio . ByteBuffer . wrap ( new java . lang . String ( ( "DATA" + i ) ) . getBytes ( "UTF-8" ) ) , sync ) ; } int i = 0 ; for ( org . fusesourc... | org . junit . Assert . assertEquals ( ( "DATA" + ( i ++ ) ) , new java . lang . String ( buffer . array ( ) , "UTF-8" ) ) |
testModifyRegionReplicasEnabledTable ( ) { final org . apache . hadoop . hbase . TableName tableName = org . apache . hadoop . hbase . TableName . valueOf ( name . getMethodName ( ) ) ; org . apache . hadoop . hbase . client . TestAdmin1 . TEST_UTIL . createTable ( tableName , HConstants . CATALOG_FAMILY ) . close ( ) ... | org . junit . Assert . assertFalse ( org . apache . hadoop . hbase . client . TestAdmin1 . ADMIN . tableExists ( tableName ) ) |
shouldSkipN ( ) { int [ ] data = new int [ ( 5 * ( blockSize ) ) + 1 ] ; for ( int i = 0 ; i < ( data . length ) ; i ++ ) { data [ i ] = i * 32 ; } writeData ( data ) ; reader = new org . apache . parquet . column . values . delta . DeltaBinaryPackingValuesReader ( ) ; reader . initFromPage ( 100 , writer . getBytes ( ... | org . junit . Assert . assertEquals ( ( i * 32 ) , reader . readInteger ( ) ) |
testRGB ( ) { org . eclipse . swt . graphics . RGB rgb = new org . eclipse . swt . graphics . RGB ( 255 , 0 , 0 ) ; org . eclipse . swt . widgets . ColorDialog dialog = new org . eclipse . swt . widgets . ColorDialog ( shell ) ; dialog . setRGB ( rgb ) ; "<AssertPlaceHolder>" ; } getRGB ( ) { return rgb ; } | org . junit . Assert . assertEquals ( rgb , dialog . getRGB ( ) ) |
testEqualsString ( ) { ca . uhn . fhir . model . primitive . UriDt dt = new ca . uhn . fhir . model . primitive . UriDt ( "http://example.com/foo" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ! ( obj instanceof ca . u... | org . junit . Assert . assertTrue ( dt . equals ( "http://example.com/foo" ) ) |
testException ( ) { javax . ws . rs . client . Client rest = restClientThrowing ( new java . lang . RuntimeException ( "Something<sp>went<sp>wrong!" ) ) ; org . springframework . ide . eclipse . beans . ui . live . model . TypeLookup types = mock ( org . springframework . ide . eclipse . beans . ui . live . model . Typ... | org . junit . Assert . assertNull ( client . getRequestMappings ( ) ) |
testLastRevRestore ( ) { clock . waitUntil ( ( ( ( clock . getTime ( ) ) + ( mk . getClusterInfo ( ) . getLeaseTime ( ) ) ) + 10 ) ) ; setupScenario ( ) ; int pendingCount = mk . getPendingWriteCount ( ) ; clock . waitUntil ( ( ( ( clock . getTime ( ) ) + ( mk . getClusterInfo ( ) . getLeaseTime ( ) ) ) + 1000 ) ) ; or... | org . junit . Assert . assertEquals ( pendingCount , recoveryAgent . recover ( mk . getClusterInfo ( ) . getId ( ) ) ) |
root ( ) { org . jboss . as . console . client . v3 . dmr . AddressTemplate at = org . jboss . as . console . client . v3 . dmr . AddressTemplate . of ( "/" ) ; "<AssertPlaceHolder>" ; } getTemplate ( ) { return template ; } | org . junit . Assert . assertTrue ( ( ( at . getTemplate ( ) . length ( ) ) == 0 ) ) |
onlyInAJdkLike ( ) { org . eclipse . collections . api . set . MutableSet < java . lang . Integer > onlyInA = org . eclipse . collections . impl . set . mutable . UnifiedSet . newSet ( this . setA ) ; onlyInA . removeAll ( this . setB ) ; "<AssertPlaceHolder>" ; } newSetWith ( org . eclipse . collections . api . block ... | org . junit . Assert . assertEquals ( org . eclipse . collections . impl . set . mutable . UnifiedSet . newSetWith ( 1 , 2 ) , onlyInA ) |
testCreateQueryChainMultiCollectionEmpty ( ) { final java . util . List < org . apache . lucene . search . Query > query = new org . yes . cart . search . query . impl . ProductSkuIdSearchQueryBuilder ( ) . createQueryChain ( null , "sku.skuId" , java . util . Collections . emptyList ( ) ) ; "<AssertPlaceHolder>" ; } c... | org . junit . Assert . assertNull ( query ) |
findManyByConditionWithMultipleMatchesShouldSucceed ( ) { java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( 1 ) ; O someO = createSomeO ( ) ; java . util . concurrent . CompletableFuture < T > insertFuture1 = insertAndReturn ( setSomeO ( create ( ) , someO ) ) ; java . ut... | org . junit . Assert . assertEquals ( 2 , values . size ( ) ) |
testAddRollback ( ) { org . fusesource . hawtdb . internal . page . Transaction tx = pf . tx ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { java . lang . String t = "page:" + i ; int page1 = store ( tx , t ) ; tx . rollback ( ) ; int page2 = store ( tx , t ) ; tx . rollback ( ) ; "<AssertPlaceHolder>" ; } } rollback ( ) { a... | org . junit . Assert . assertEquals ( page1 , page2 ) |
testBlokkeringAntwoordLeegVerzoek ( ) { try { blokkeringVerzoekService . verwerkBericht ( null ) ; org . junit . Assert . fail ( "Er<sp>zou<sp>een<sp>fout<sp>op<sp>moeten<sp>treden." ) ; } catch ( final java . lang . Exception e ) { "<AssertPlaceHolder>" ; } verify ( brpDalService , times ( 0 ) ) . vraagOpBlokkering ( ... | org . junit . Assert . assertNotNull ( "Er<sp>zou<sp>een<sp>fout<sp>op<sp>moeten<sp>treden." , e ) |
whenCallExtractSimpleQueryParamWithHiddenCharacterAndDelimiter ( ) { java . util . Map < java . lang . String , com . stratio . explorer . notebook . form . Input > params = com . stratio . explorer . notebook . form . Input . extractSimpleQueryParam ( ScriptTypes . HIDDEN_CHAR_AND_DELIMITER ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertTrue ( params . isEmpty ( ) ) |
testWorkersResultsTransformation ( ) { com . datascience . utils . transformations . ResultsFactory . WorkerResultNominalFactory creator = new com . datascience . utils . transformations . ResultsFactory . WorkerResultNominalFactory ( ) ; creator . setCategories ( com . google . common . collect . Lists . newArrayList ... | org . junit . Assert . assertEquals ( wr , transformedWR ) |
testRevokedEndpointCredentialsSyncRequest ( ) { org . kaaproject . kaa . server . transport . channel . ChannelContext channelContextMock = org . mockito . Mockito . mock ( org . kaaproject . kaa . server . transport . channel . ChannelContext . class ) ; org . kaaproject . kaa . common . endpoint . gen . SyncRequest r... | org . junit . Assert . assertNotNull ( akkaService . getActorSystem ( ) ) |
testPut ( ) { org . apache . edgent . providers . direct . DirectProvider ep = new org . apache . edgent . providers . direct . DirectProvider ( ) ; org . apache . edgent . topology . Topology topology = ep . newTopology ( ) ; java . lang . String url = "http://httpbin.org/put" ; org . apache . edgent . topology . TStr... | org . junit . Assert . assertTrue ( endCondition . valid ( ) ) |
testDate ( ) { int objectNumber = 4101 ; org . eclipse . birt . data . engine . olap . data . util . BufferedPrimitiveDiskArray list = new org . eclipse . birt . data . engine . olap . data . util . BufferedPrimitiveDiskArray ( 500 ) ; for ( int i = 0 ; i < objectNumber ; i ++ ) { list . add ( new java . util . Date ( ... | org . junit . Assert . assertEquals ( list . get ( i ) , new java . util . Date ( ( 1900100000 + ( i * 1000 ) ) ) ) |
testHuidigeSituatieNull ( ) { java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteiten = brby0178 . voerRegelUit ( null , null , null , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , berichtEntiteiten . size ( ) ) |
testUpdate ( ) { org . smartdata . model . ClusterConfig clusterConfig = new org . smartdata . model . ClusterConfig ( 1 , "test" , "test1" ) ; clusterConfigDao . insert ( clusterConfig ) ; clusterConfigDao . updateById ( 1 , "test2" ) ; clusterConfig . setConfig_path ( "test2" ) ; "<AssertPlaceHolder>" ; } getById ( l... | org . junit . Assert . assertTrue ( clusterConfigDao . getById ( 1 ) . equals ( clusterConfig ) ) |
simple ( ) { java . io . File current = openWorkingDir ( ) ; java . io . File root = add ( "root" , "/" ) ; touch ( current , "a.txt" ) ; invoke ( "put" , "a.txt" , "/" ) ; "<AssertPlaceHolder>" ; } is ( java . lang . String ) { com . asakusafw . dmdl . java . util . JavaName jn = com . asakusafw . dmdl . java . util .... | org . junit . Assert . assertThat ( new java . io . File ( root , "a.txt" ) , is ( file ( ) ) ) |
testCommas ( ) { java . lang . String stringWithBlanks = "a,blank,\"Str,ing\",with,\",,\'s,p,a,c,e,s\'" ; java . lang . String multiLineString = org . esa . snap . smart . configurator . ui . LineSplitTextEditDialog . toMultiLine ( stringWithBlanks , "," ) ; java . lang . String [ ] linesArray = multiLineString . split... | org . junit . Assert . assertEquals ( 5 , linesArray . length ) |
joinOne ( ) { io . trane . future . Future < java . lang . Integer > f = io . trane . future . Future . value ( 1 ) ; "<AssertPlaceHolder>" ; } voided ( ) { io . trane . future . Future < java . lang . Void > future = io . trane . future . Future . value ( 1 ) . voided ( ) ; org . junit . Assert . assertNull ( get ( fu... | org . junit . Assert . assertEquals ( f . voided ( ) , io . trane . future . Future . join ( java . util . Arrays . asList ( f ) ) ) |
testRandom2 ( ) { java . lang . String recv = net . floodlightcontroller . hasupport . HAServerTest . tc . send ( "@#$%" ) ; "<AssertPlaceHolder>" ; } send ( java . lang . String ) { if ( message . equals ( null ) ) { return Boolean . FALSE ; } try { sc . write ( java . nio . ByteBuffer . wrap ( message . getBytes ( ja... | org . junit . Assert . assertEquals ( recv , dc ) |
testPoint ( ) { org . locationtech . udig . tools . edit . support . EditGeom point = bb . newGeom ( "line" , ShapeType . POINT ) ; org . locationtech . udig . tools . edit . support . PrimitiveShape shell = point . getShell ( ) ; bb . addPoint ( 10 , 10 , shell ) ; "<AssertPlaceHolder>" ; } isValid ( org . locationtec... | org . junit . Assert . assertNull ( validator . isValid ( handler , null , null ) ) |
shouldReturnExistingCompanyEntity ( ) { given ( parameterService . getParameter ( ) ) . willReturn ( parameter ) ; given ( parameter . getBelongsToField ( ParameterFields . COMPANY ) ) . willReturn ( company ) ; given ( company . isValid ( ) ) . willReturn ( true ) ; com . qcadoo . model . api . Entity existingcompany ... | org . junit . Assert . assertEquals ( company , existingcompany ) |
checked_to_unchecked ( ) { java . lang . String foo = uk . co . benjiweber . expressions . exceptions . Exceptions . unchecked ( ( ) -> uk . co . benjiweber . expressions . exceptions . Example . methodThatThrowsCheckedException ( Do . NOT_THROW ) ) ; "<AssertPlaceHolder>" ; } methodThatThrowsCheckedException ( uk . co... | org . junit . Assert . assertEquals ( "foo" , foo ) |
testAuthenticationTypeParserProperty ( ) { com . microsoft . azure . sdk . iot . deps . serializer . AuthenticationParser parser = new com . microsoft . azure . sdk . iot . deps . serializer . AuthenticationParser ( ) ; parser . setType ( AuthenticationTypeParser . SAS ) ; "<AssertPlaceHolder>" ; } getType ( ) { return... | org . junit . Assert . assertEquals ( AuthenticationTypeParser . SAS , parser . getType ( ) ) |
try_insert_multiple_companys ( ) { org . nutz . trans . Trans . exec ( Connection . TRANSACTION_READ_COMMITTED , new org . nutz . trans . Atom ( ) { public void run ( ) { dao . insert ( org . nutz . trans . Company . make ( "Google" ) ) ; dao . insert ( org . nutz . trans . Company . make ( "Yahoo" ) ) ; try { dao . in... | org . junit . Assert . assertEquals ( 5 , dao . count ( org . nutz . trans . Company . class ) ) |
testRandomXor ( ) { for ( int i = 0 ; i < 1000 ; i ++ ) { java . math . BigInteger bi1 = new java . math . BigInteger ( 256 , rnd ) ; java . math . BigInteger bi2 = new java . math . BigInteger ( 256 , rnd ) ; if ( ( ( bi1 . toString ( 16 ) . length ( ) ) == 64 ) && ( ( bi2 . toString ( 16 ) . length ( ) ) == 64 ) ) { ... | org . junit . Assert . assertEquals ( ki3 . toString ( ) , ( "0x" + s1 ) ) |
testGetJobStatusForUnexistingJob ( ) { final java . util . List < java . lang . String > jobId = java . util . Arrays . asList ( "unexisting-job" ) ; final org . xwiki . job . JobStatusStore jobStatusStorage = getComponentManager ( ) . getInstance ( org . xwiki . job . JobStatusStore . class ) ; getMockery ( ) . checki... | org . junit . Assert . assertNull ( getMockedComponent ( ) . getJobStatus ( jobId ) ) |
testUnhealthy ( ) { when ( registry . runHealthCheck ( anyString ( ) ) ) . thenReturn ( HealthCheck . Result . unhealthy ( "meh" ) ) ; final com . spotify . helios . master . metrics . HealthCheckGauge gauge = new com . spotify . helios . master . metrics . HealthCheckGauge ( registry , "foo" ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertThat ( gauge . getValue ( ) , org . hamcrest . CoreMatchers . equalTo ( 0 ) ) |
unsubscribe ( ) { com . github . cjm0000000 . mmt . core . message . process . PassiveMsgProcessor api = context . getApplicationContext ( ) . getBean ( com . github . cjm0000000 . mmt . yixin . api . passive . SimpleYiXinMsgProcessor . class ) ; java . lang . String recvMsg = "<xml><sp><ToUserName>11b09b69e7e169ed</To... | org . junit . Assert . assertEquals ( result , null ) |
testInvokeCallbackWithTypedArray_Int8Array ( ) { com . eclipsesource . v8 . JavaCallback callback = new com . eclipsesource . v8 . JavaCallback ( ) { @ com . eclipsesource . v8 . Override public com . eclipsesource . v8 . Boolean invoke ( final com . eclipsesource . v8 . V8Object receiver , final com . eclipsesource . ... | org . junit . Assert . assertTrue ( ( ( java . lang . Boolean ) ( result ) ) ) |
shouldBeTrueForInstalledPackage ( ) { addInstalledPackage ( com . navercorp . utilset . ui . ActivityUtilsTest . INSTALLED_PACKAGE ) ; boolean installed = com . navercorp . utilset . ui . ActivityUtils . isPackageInstalled ( context , com . navercorp . utilset . ui . ActivityUtilsTest . INSTALLED_PACKAGE ) ; "<AssertPl... | org . junit . Assert . assertThat ( installed , org . hamcrest . CoreMatchers . is ( true ) ) |
setUnit_celsius_unitIsSet ( ) { java . lang . String unitOfMeasure = "Celsius" ; sampledValue . setUnit ( unitOfMeasure ) ; "<AssertPlaceHolder>" ; } getUnit ( ) { return unit ; } | org . junit . Assert . assertThat ( sampledValue . getUnit ( ) , org . hamcrest . CoreMatchers . equalTo ( unitOfMeasure ) ) |
testHrlist ( ) { ssdbClient . hset ( "h1" , "name" , "name_of_h1" ) ; ssdbClient . hset ( "h2" , "name" , "name_of_h2" ) ; java . util . List < java . lang . String > keys = ssdbClient . hrlist ( "h9" , "h0" , ( - 1 ) ) ; "<AssertPlaceHolder>" ; } hrlist ( java . lang . String , java . lang . String , int ) { return co... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "h2" , "h1" ) , keys ) |
should_find_by_all_with_start_and_max ( ) { testData . createSimple ( "testFindAll1" ) ; testData . createSimple ( "testFindAll2" ) ; java . util . List < org . apache . deltaspike . data . test . domain . Simple > find = repo . findAll ( 0 , 1 ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( this . wrappedNavigationC... | org . junit . Assert . assertEquals ( 1 , find . size ( ) ) |
shouldLoadObjectWhenCacheExists ( ) { org . robolectric . internal . dependency . CachedDependencyResolver . Cache cache = new org . robolectric . internal . dependency . CachedDependencyResolver . FileCache ( temporaryFolder . getRoot ( ) , org . robolectric . internal . dependency . CachedDependencyResolverFileCacheT... | org . junit . Assert . assertEquals ( expectedValue , value ) |
testDecode ( ) { org . traccar . protocol . NavigilProtocolDecoder decoder = new org . traccar . protocol . NavigilProtocolDecoder ( null ) ; decoder . setDataManager ( new org . traccar . helper . TestDataManager ( ) ) ; byte [ ] buf1 = new byte [ ] { 1 , 0 , 67 , 0 , 4 , 0 , 32 , 0 , 0 , 0 , ( ( byte ) ( 246 ) ) , 2 ... | org . junit . Assert . assertNull ( decoder . decode ( null , null , org . jboss . netty . buffer . ChannelBuffers . wrappedBuffer ( ByteOrder . LITTLE_ENDIAN , buf1 ) ) ) |
whenReadUsingCharSource_thenRead ( ) { java . lang . String expectedValue = "Hello<sp>world" ; java . io . File file = new java . io . File ( "test.txt" ) ; com . github . mysite . common . guava . CharSource source = com . github . mysite . common . guava . Files . asCharSource ( file , Charsets . UTF_8 ) ; java . lan... | org . junit . Assert . assertEquals ( expectedValue , result ) |
testGet ( ) { com . belerweb . social . bean . Result < java . util . List < com . belerweb . social . weixin . bean . Group > > result = weixin . getGroup ( ) . get ( ) ; "<AssertPlaceHolder>" ; for ( com . belerweb . social . weixin . bean . Group group : result . getResult ( ) ) { com . belerweb . social . weixin . ... | org . junit . Assert . assertTrue ( result . success ( ) ) |
nextRendererTest ( ) { com . itextpdf . kernel . pdf . PdfDocument pdfDoc = new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfWriter ( new java . io . ByteArrayOutputStream ( ) ) ) ; pdfDoc . addNewPage ( ) ; com . itextpdf . layout . Document doc = new com . itextpdf . layout . D... | org . junit . Assert . assertEquals ( result1 . getOccupiedArea ( ) , result2 . getOccupiedArea ( ) ) |
testRandomTcpNotSentLowAt ( ) { final long expected = io . netty . channel . epoll . EpollSocketChannelConfigTest . randLong ( 0 , 4294967295L ) ; final long actual ; try { io . netty . channel . epoll . EpollSocketChannelConfigTest . ch . config ( ) . setTcpNotSentLowAt ( expected ) ; actual = io . netty . channel . e... | org . junit . Assert . assertEquals ( expected , actual ) |
ibanContructionRandomDoesNotOverwriteBankAccount ( ) { org . iban4j . Iban iban = new org . iban4j . Iban . Builder ( ) . countryCode ( CountryCode . AT ) . accountNumber ( "12345678901" ) . buildRandom ( ) ; "<AssertPlaceHolder>" ; } getAccountNumber ( ) { return org . iban4j . IbanUtil . getAccountNumber ( value ) ; ... | org . junit . Assert . assertThat ( iban . getAccountNumber ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( "12345678901" ) ) ) |
transformMultiPom ( ) { java . io . File pomFile = getResourceAsFile ( "/poms/multi/pom.xml" ) ; java . util . Map < hudson . maven . ModuleName , java . lang . String > modules = com . google . common . collect . Maps . newHashMap ( ) ; modules . put ( new hudson . maven . ModuleName ( "org.jfrog.test.nested" , "neste... | org . junit . Assert . assertEquals ( expectedStr , pomStr ) |
testInvalidDateTooLate ( ) { date = df . parse ( "09092040" ) ; java . util . List < no . bekk . bekkopen . person . Fodselsnummer > options = no . bekk . bekkopen . person . FodselsnummerCalculator . getManyFodselsnummerForDate ( date ) ; "<AssertPlaceHolder>" ; } getManyFodselsnummerForDate ( no . bekk . bekkopen . p... | org . junit . Assert . assertEquals ( 0 , options . size ( ) ) |
test_containsPointOpenedCircle ( ) { net . osmand . data . Multipolygon testee = new net . osmand . data . MultipolygonBuilder ( ) . addOuterWay ( scale ( 4 , openedBaseCircle ) ) . build ( ) ; net . osmand . data . LatLon center = testee . getCenterPoint ( ) ; "<AssertPlaceHolder>" ; } containsPoint ( net . osmand . d... | org . junit . Assert . assertTrue ( testee . containsPoint ( center ) ) |
isAddingAndGroupedByOr_02 ( ) { final java . lang . String query = "select<sp>r<sp>from<sp>RegularEntityOne<sp>r<sp>where<sp>(r.stringAttribute<sp>=<sp>'Just<sp>a<sp>String<sp>02'<sp>and<sp>r.longAttributeOne<sp>=<sp>33)<sp>or<sp>(r.booleanAttributeTwo<sp>=<sp>true<sp>and<sp>r.longAttributeTwo<sp>=<sp>15)" ; final java... | org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) == 2 ) ) |
shouldProperlyCalculateNextPositionInDirectionToTarget ( ) { net . evlikat . siberian . geo . Position next = net . evlikat . siberian . geo . Position . on ( 5 , 3 ) . inDirectionTo ( net . evlikat . siberian . geo . Position . on ( 2 , 2 ) , net . evlikat . siberian . geo . PositionTest . ALL ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertEquals ( net . evlikat . siberian . geo . Position . on ( 5 , 2 ) , next ) |
setFetchCount ( ) { timeline . setFetchCount ( book . twju . chapter_2 . Listing_5_ImplicitTearDown_TimelineTest . NEW_FETCH_COUNT ) ; "<AssertPlaceHolder>" ; } getFetchCount ( ) { return fetchCount ; } | org . junit . Assert . assertEquals ( book . twju . chapter_2 . Listing_5_ImplicitTearDown_TimelineTest . NEW_FETCH_COUNT , timeline . getFetchCount ( ) ) |
testGetVisible ( ) { editor . setVisible ( false ) ; "<AssertPlaceHolder>" ; } getVisible ( ) { return false ; } | org . junit . Assert . assertFalse ( editor . getVisible ( ) ) |
cantAcquireLockFromParallelThread ( ) { final com . turbospaces . spaces . tx . TransactionModificationContext c1 = new com . turbospaces . spaces . tx . TransactionModificationContext ( ) ; final com . turbospaces . spaces . tx . TransactionModificationContext c2 = new com . turbospaces . spaces . tx . TransactionModi... | org . junit . Assert . assertFalse ( b . get ( ) ) |
testReadShort ( ) { org . apache . qpid . jms . message . JmsBytesMessage msg = factory . createBytesMessage ( ) ; msg . writeShort ( ( ( short ) ( 3000 ) ) ) ; msg . reset ( ) ; "<AssertPlaceHolder>" ; } readShort ( ) { initializeReading ( ) ; try { return this . dataIn . readShort ( ) ; } catch ( java . io . EOFExcep... | org . junit . Assert . assertTrue ( ( ( msg . readShort ( ) ) == 3000 ) ) |
getContentTypeReturnsCorrectContentType ( ) { com . microsoft . azure . sdk . iot . device . transport . https . HttpsBatchMessage batchMsg = new com . microsoft . azure . sdk . iot . device . transport . https . HttpsBatchMessage ( ) ; java . lang . String testContentType = batchMsg . getContentType ( ) ; final java .... | org . junit . Assert . assertThat ( testContentType , org . hamcrest . CoreMatchers . is ( expectedContentType ) ) |
testGetTextEmpty ( ) { "<AssertPlaceHolder>" ; } getText ( java . lang . Object ) { return ArchiLabelProvider . INSTANCE . getLabel ( element ) ; } | org . junit . Assert . assertEquals ( "<sp>" , provider . getText ( new java . lang . Object ( ) ) ) |
delete_NoId ( ) { try { datastore . delete ( TestConstants . PERSON ) ; org . junit . Assert . fail ( ) ; } catch ( at . ac . tuwien . infosys . jcloudscale . datastore . api . DatastoreException e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; } | org . junit . Assert . assertNotNull ( e . getMessage ( ) ) |
testDelegationTokenWithDoAs ( ) { final org . apache . hadoop . hdfs . DistributedFileSystem dfs = cluster . getFileSystem ( ) ; final org . apache . hadoop . security . Credentials creds = new org . apache . hadoop . security . Credentials ( ) ; final org . apache . hadoop . security . token . Token < ? > [ ] tokens =... | org . junit . Assert . assertEquals ( 1 , tokens . length ) |
run ( ) { final org . sentilo . common . hook . SentiloShutdownHook hook = new org . sentilo . common . hook . SentiloShutdownHook ( name ) ; hook . run ( ) ; "<AssertPlaceHolder>" ; } getHookName ( ) { return hookName ; } | org . junit . Assert . assertEquals ( name , hook . getHookName ( ) ) |
tree_iter_2_01 ( ) { int [ ] keys = new int [ ] { 0 , 2 , 4 , 6 , 8 , 1 , 3 , 5 , 7 , 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 ( rInd... | org . junit . Assert . assertEquals ( expected , x ) |
readZeroByte ( ) { final java . io . ByteArrayInputStream theStream = new java . io . ByteArrayInputStream ( new byte [ 2 ] ) ; final byte [ ] theResult = net . violet . common . utils . io . StreamTools . readBytes ( theStream , 0 ) ; org . apache . commons . io . IOUtils . closeQuietly ( theStream ) ; "<AssertPlaceHo... | org . junit . Assert . assertNotNull ( theResult ) |
test ( ) { org . apromore . cpf . CanonicalProcessType cpf = yawl2Canonical . getCpf ( ) ; "<AssertPlaceHolder>" ; } getResourceType ( ) { return resourceType ; } | org . junit . Assert . assertTrue ( cpf . getResourceType ( ) . isEmpty ( ) ) |
testIsValid ( ) { org . terasoluna . gfw . common . codepoints . CodePoints codePoints = org . terasoluna . gfw . common . codepoints . CodePoints . of ( clazz ) ; "<AssertPlaceHolder>" ; } containsAll ( java . lang . String ) { return ( this . firstExcludedCodePoint ( s ) ) == ( org . terasoluna . gfw . common . codep... | org . junit . Assert . assertThat ( codePoints . containsAll ( "\n" ) , org . hamcrest . CoreMatchers . is ( true ) ) |
encodeDecode ( ) { org . apache . hadoop . ozone . s3 . util . ContinueToken ct = new org . apache . hadoop . ozone . s3 . util . ContinueToken ( "key1" , "dir1" ) ; org . apache . hadoop . ozone . s3 . util . ContinueToken parsedToken = org . apache . hadoop . ozone . s3 . util . ContinueToken . decodeFromString ( ct ... | org . junit . Assert . assertEquals ( ct , parsedToken ) |
canSerialize ( ) { java . time . Instant instant = java . time . Instant . now ( ) ; java . lang . Object value = new org . mongolink . domain . converter . InstantConverter ( ) . toDbValue ( instant ) ; "<AssertPlaceHolder>" ; } toString ( ) { return key ; } | org . junit . Assert . assertThat ( ( ( java . lang . String ) ( value ) ) , org . hamcrest . CoreMatchers . is ( instant . toString ( ) ) ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . site . navigation . model . SiteNavigationMenuItem . class , _dynamicQueryClassLoader ) ; dynamicQuery . ... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
whenExtractAParameterThenTheParsedParameterIsReturned ( ) { when ( parameterParser . parse ( com . thoughtworks . gauge . execution . parameters . ANY_TYPE , com . thoughtworks . gauge . execution . ParameterTestHelpers . aParameter ( ) ) ) . thenReturn ( com . thoughtworks . gauge . execution . parameters . SPECIFIC_V... | org . junit . Assert . assertThat ( stream ( extract ) . filter ( ( v ) -> v == com . thoughtworks . gauge . execution . parameters . SPECIFIC_VALUE ) . count ( ) , org . hamcrest . CoreMatchers . is ( java . lang . Long . valueOf ( extract . length ) ) ) |
testRiskModelShouldGiveCorrectValue ( ) { java . lang . Object actual = d_pm . getModel ( OddsRatioScalePresentation . PROPERTY_RISK ) . getValue ( ) ; java . lang . Object expected = org . drugis . addis . presentation . RiskScalePresentation . convertInterval ( d_criterion . getScale ( ) ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertEquals ( expected , actual ) |
persistenceDisabled ( ) { java . lang . String name = "myApp" ; com . google . firebase . FirebaseApp . initializeApp ( com . google . firebase . internal . FirebaseAppStoreTest . ALL_VALUES_OPTIONS , name ) ; com . google . firebase . TestOnlyImplFirebaseTrampolines . clearInstancesForTest ( ) ; com . google . firebas... | org . junit . Assert . assertTrue ( ( ! ( appStore . getAllPersistedAppNames ( ) . contains ( name ) ) ) ) |
testKeyValueTable ( ) { java . util . ArrayList < javafx . util . Pair < java . lang . String , java . lang . String > > data = new java . util . ArrayList ( ) ; data . add ( new javafx . util . Pair ( keys [ 0 ] , values [ 0 ] ) ) ; data . add ( new javafx . util . Pair ( keys [ 1 ] , values [ 1 ] ) ) ; data . add ( n... | org . junit . Assert . assertTrue ( ( ( keyValueTableView . getItems ( ) . size ( ) ) == 3 ) ) |
shouldGetScoreForOperationChain ( ) { final uk . gov . gchq . gaffer . operation . impl . get . GetAdjacentIds getAdjacentIds = mock ( uk . gov . gchq . gaffer . operation . impl . get . GetAdjacentIds . class ) ; final uk . gov . gchq . gaffer . operation . impl . get . GetElements getElements = mock ( uk . gov . gchq... | org . junit . Assert . assertEquals ( 6 , score ) |
adapterTrue ( ) { when ( filterAdapter . adapt ( any ( ) , any ( ) ) ) . thenReturn ( true ) ; ddf . catalog . operation . QueryRequest process = plugin . process ( source , queryRequest ) ; "<AssertPlaceHolder>" ; verify ( filterBuilder , never ( ) ) . attribute ( anyString ( ) ) ; } process ( ddf . catalog . source .... | org . junit . Assert . assertThat ( process , org . hamcrest . Matchers . is ( queryRequest ) ) |
testIsVersionAppliedToIndexVersionMatches ( ) { versionNumber = 1L ; when ( mockIndexDao . getMaxCurrentCompleteVersionForTable ( tableId ) ) . thenReturn ( versionNumber ) ; "<AssertPlaceHolder>" ; } isVersionAppliedToIndex ( java . lang . String , long ) { final long currentVersion = tableIndexDao . getMaxCurrentComp... | org . junit . Assert . assertTrue ( manager . isVersionAppliedToIndex ( tableId , versionNumber ) ) |
testDoesntEmailWhenQuarantinedPasses ( ) { org . jenkinsci . plugins . quarantine . Mailbox . clearAll ( ) ; hudson . tasks . junit . TestResult tr = getResultsFromJUnitResult ( "junit-1-failure.xml" ) ; tr . getSuite ( "SuiteA" ) . getCase ( "TestB" ) . getTestAction ( org . jenkinsci . plugins . quarantine . Quaranti... | org . junit . Assert . assertEquals ( 0 , inbox . size ( ) ) |
testSerialization ( ) { org . apache . commons . math3 . geometry . Space e3 = org . apache . commons . math3 . geometry . euclidean . threed . Euclidean3D . getInstance ( ) ; org . apache . commons . math3 . geometry . Space deserialized = ( ( org . apache . commons . math3 . geometry . Space ) ( org . apache . common... | org . junit . Assert . assertTrue ( ( e3 == deserialized ) ) |
testDeregisterOnOutOfScope ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; org . apache . hadoop . hbase . conf . ConfigurationManager cm = new org . apache . hadoop . hbase . conf . ConfigurationManager ( ) ; boolean outOfScopeObserversDeregistered = fal... | org . junit . Assert . assertTrue ( outOfScopeObserversDeregistered ) |
floatAndRange ( ) { expect ( mock . floatReturningMethod ( 4 ) ) . andThrow ( org . easymock . tests . UsageExpectAndThrowTest . EXCEPTION ) . once ( ) ; replay ( mock ) ; try { mock . floatReturningMethod ( 4 ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . RuntimeException exception ) { "<AssertPlaceHold... | org . junit . Assert . assertSame ( org . easymock . tests . UsageExpectAndThrowTest . EXCEPTION , exception ) |
testIssue7 ( ) { com . dooapp . fxform . FXForm fxForm = new com . dooapp . fxform . FXForm ( ) ; fxForm . setSource ( new com . dooapp . fxform . TestBean ( ) ) ; fxForm . setSkin ( FXFormSkinFactory . INLINE_FACTORY . createSkin ( fxForm ) ) ; fxForm . setSource ( null ) ; "<AssertPlaceHolder>" ; } getElements ( ) { ... | org . junit . Assert . assertEquals ( 0 , fxForm . getElements ( ) . size ( ) ) |
testGetAND ( ) { java . lang . String actual = table . getAND ( ) ; java . lang . String expected = "and" ; "<AssertPlaceHolder>" ; } getAND ( ) { return "and" ; } | org . junit . Assert . assertEquals ( expected , actual ) |
invocationIdShortcutShouldReturnTheInvocationIdIfSet ( ) { when ( unit . get ( eq ( TraceeConstants . INVOCATION_ID_KEY ) ) ) . thenReturn ( "ourInvocationId" ) ; "<AssertPlaceHolder>" ; } getInvocationId ( ) { return get ( TraceeConstants . INVOCATION_ID_KEY ) ; } | org . junit . Assert . assertThat ( unit . getInvocationId ( ) , org . hamcrest . Matchers . is ( "ourInvocationId" ) ) |
RunContainerFromBitmap2 ( ) { org . roaringbitmap . Container rc = new org . roaringbitmap . RunContainer ( ) ; org . roaringbitmap . Container bc = new org . roaringbitmap . BitmapContainer ( ) ; rc = rc . add ( ( ( short ) ( 2 ) ) ) ; bc = bc . add ( ( ( short ) ( 2 ) ) ) ; rc = rc . add ( ( ( short ) ( 3 ) ) ) ; bc ... | org . junit . Assert . assertEquals ( rc , rc2 ) |
testKafkaResultExporterFactory ( ) { org . apache . rya . indexing . pcj . fluo . app . export . kafka . KafkaBindingSetExporterFactory factory = new org . apache . rya . indexing . pcj . fluo . app . export . kafka . KafkaBindingSetExporterFactory ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( factory ) |
testDetachTraceObject ( ) { com . navercorp . pinpoint . profiler . context . TraceFactory traceFactory = this . sampledTraceFactory ; traceFactory . newTraceObject ( ) ; traceFactory . removeTraceObject ( ) ; com . navercorp . pinpoint . bootstrap . context . Trace rawTraceObject = traceFactory . currentRawTraceObject... | org . junit . Assert . assertNull ( rawTraceObject ) |
testGetRegularMessage ( ) { final java . lang . String expectedErrorMessage = "Expected<sp>regular<sp>message." ; final org . kie . workbench . common . dmn . client . editors . types . common . errors . DataTypeNameIsBlankErrorMessage errorMessage = new org . kie . workbench . common . dmn . client . editors . types .... | org . junit . Assert . assertEquals ( expectedErrorMessage , actualErrorMessage ) |
filterMetadataTest ( ) { final org . apache . rya . indexing . pcj . fluo . app . query . FluoQueryMetadataDAO dao = new org . apache . rya . indexing . pcj . fluo . app . query . FluoQueryMetadataDAO ( ) ; final org . apache . rya . indexing . pcj . fluo . app . query . FilterMetadata . Builder builder = org . apache ... | org . junit . Assert . assertEquals ( originalMetadata , storedMetadata ) |
testGetTaxonomyUri ( ) { java . lang . String expResult = "uri" ; java . lang . String result = org . opencastproject . feed . impl . CategoryImplTest . instance . getTaxonomyUri ( ) ; "<AssertPlaceHolder>" ; } getTaxonomyUri ( ) { return taxonomyUri ; } | org . junit . Assert . assertEquals ( expResult , result ) |
shouldGetAllColumnsOfArticle ( ) { java . sql . ResultSet rs = this . metaData . getColumns ( null , null , "Article" , null ) ; "<AssertPlaceHolder>" ; } rsSizeOf ( java . sql . ResultSet ) { int tableCount = 0 ; while ( rs . next ( ) ) { tableCount ++ ; } return tableCount ; } | org . junit . Assert . assertThat ( rsSizeOf ( rs ) , org . hamcrest . Matchers . is ( 5 ) ) |
testMissingPrivateKey ( ) { logger . info ( LinShareTestConstants . BEGIN_TEST ) ; java . security . interfaces . RSAPrivateKey key = org . linagora . linshare . core . utils . PemRsaKeyHelper . loadPrivateKey ( ( ( pemPrivateKeyPath ) + "foo" ) ) ; "<AssertPlaceHolder>" ; logger . info ( LinShareTestConstants . END_TE... | org . junit . Assert . assertEquals ( null , key ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.