input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
runTest ( ) { boolean result = checkNoError ( "Social_Activities_Get_Completed_Activities" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
validateFormWithoutAnyValidates ( ) { com . throrinstudio . android . common . libs . validator . Form form = new com . throrinstudio . android . common . libs . validator . Form ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { boolean formValid = true ; for ( com . throrinstudio . android . common . libs . validator . A... | org . junit . Assert . assertTrue ( form . validate ( ) ) |
noDuplicateRealmId ( ) { final java . util . Set < java . lang . String > realmIds = new java . util . HashSet ( ) ; for ( com . oracle . bmc . Realm realm : com . oracle . bmc . Realm . values ( ) ) { "<AssertPlaceHolder>" ; realmIds . add ( realm . getRealmId ( ) ) ; } } values ( ) { synchronized ( com . oracle . bmc... | org . junit . Assert . assertFalse ( realmIds . contains ( realm . getRealmId ( ) ) ) |
givenArticleService_whenSaveArticle_thenIdIsAssigned ( ) { final java . util . List < com . baeldung . spring . data . es . model . Author > authors = asList ( new com . baeldung . spring . data . es . model . Author ( "John<sp>Smith" ) , johnDoe ) ; com . baeldung . spring . data . es . model . Article article = new c... | org . junit . Assert . assertNotNull ( article . getId ( ) ) |
testDateGreaterThan ( ) { deleteAllIn ( provider ) ; org . joda . time . DateTime now = new org . joda . time . DateTime ( ) ; addMetacardWithModifiedDate ( now ) ; filter = filterBuilder . dateGreaterThan ( Metacard . MODIFIED , dateAfterNow ( now ) ) ; results = getResultsForFilteredQuery ( filter ) ; "<AssertPlaceHo... | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
testGetPropertyStatus ( ) { org . apache . jackrabbit . oak . api . Tree a = root . getTree ( "/a" ) ; for ( java . lang . String propName : hiddenProps ) { "<AssertPlaceHolder>" ; } } getPropertyStatus ( java . lang . String ) { beforeRead ( ) ; return super . getPropertyStatus ( checkNotNull ( name ) ) ; } | org . junit . Assert . assertNull ( a . getPropertyStatus ( propName ) ) |
testResourceFree ( ) { java . nio . channels . FileLock lock = null ; java . io . RandomAccessFile randomAccessFile = null ; try { readData ( sampleFile , null ) ; java . io . File fileAfterRead = new java . io . File ( sampleFile ) ; randomAccessFile = new java . io . RandomAccessFile ( fileAfterRead , "rw" ) ; java .... | org . junit . Assert . assertTrue ( lock . isValid ( ) ) |
chain8 ( ) { final java . util . List < java . lang . Comparable > result = com . github . underscore . U . chain ( com . github . underscore . U . class . getDeclaredMethods ( ) ) . map ( new com . github . underscore . Function < java . lang . reflect . Method , java . lang . String > ( ) { public java . lang . Strin... | org . junit . Assert . assertEquals ( 4 , result . size ( ) ) |
shortConstructorUrlEncodesDeviceId ( ) { final java . lang . String iotHubHostname = "sample.iothubhostname" ; final java . lang . String deviceId = "?&sample-deviceid" ; final java . lang . String iotHubMethodPath = "/sample-path" ; com . microsoft . azure . sdk . iot . device . net . IotHubUri uri = new com . microso... | org . junit . Assert . assertThat ( testUriStr , org . hamcrest . CoreMatchers . is ( expectedUriStr ) ) |
testNotBlankMsgBlankStringShouldThrow ( ) { final java . lang . String string = "<sp>\n<sp>\t<sp>\r<sp>\n<sp>" ; try { org . apache . commons . lang3 . Validate . notBlank ( string , "Message" ) ; org . junit . Assert . fail ( "Expecting<sp>IllegalArgumentException" ) ; } catch ( final java . lang . IllegalArgumentExce... | org . junit . Assert . assertEquals ( "Message" , e . getMessage ( ) ) |
testMissingDateHeaderIsIgnored ( ) { final org . apache . hc . core5 . http . Header [ ] headers = new org . apache . hc . core5 . http . Header [ ] { } ; entry = new org . apache . hc . client5 . http . cache . HttpCacheEntry ( new java . util . Date ( ) , new java . util . Date ( ) , org . apache . hc . core5 . http ... | org . junit . Assert . assertNull ( entry . getDate ( ) ) |
testThrowsOnNonJson ( ) { java . lang . String json = "foo" ; new io . nats . client . impl . NatsServerInfo ( json ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( true ) |
testModifyTicketWriteBytesZero ( ) { org . irods . jargon . ticket . packinstr . TicketAdminInp pi = org . irods . jargon . ticket . packinstr . TicketAdminInp . instanceForModifyByteWriteNumber ( ticketId , 0 ) ; "<AssertPlaceHolder>" ; } instanceForModifyByteWriteNumber ( java . lang . String , long ) { if ( ( ticket... | org . junit . Assert . assertNotNull ( pi ) |
testContentType ( ) { com . woonoz . proxy . servlet . UrlRewriter rewriter = org . easymock . EasyMock . createMock ( com . woonoz . proxy . servlet . UrlRewriter . class ) ; org . easymock . EasyMock . replay ( rewriter ) ; com . woonoz . proxy . servlet . AbstractHeadersHandler handler = new com . woonoz . proxy . s... | org . junit . Assert . assertEquals ( headerValue , actualValue ) |
testRemoveColumnWhenThereIsNoEqualColumn ( ) { final org . uberfire . ext . wires . core . grids . client . model . impl . BaseGridColumn < java . lang . String > column1 = new org . uberfire . ext . wires . core . grids . client . model . impl . BaseGridColumn ( header , columnRenderer , 25.0 ) ; final org . uberfire ... | org . junit . Assert . assertEquals ( 2 , columns . size ( ) ) |
testTanhNaN ( ) { "<AssertPlaceHolder>" ; } tanh ( ) { if ( ( isNaN ) || ( java . lang . Double . isInfinite ( imaginary ) ) ) { return org . hipparchus . complex . Complex . NaN ; } if ( ( real ) > 20.0 ) { return createComplex ( 1.0 , 0.0 ) ; } if ( ( real ) < ( - 20.0 ) ) { return createComplex ( ( - 1.0 ) , 0.0 ) ;... | org . junit . Assert . assertTrue ( Complex . NaN . tanh ( ) . isNaN ( ) ) |
ParseSubjectFromMessageWhenMessageNull ( ) { gov . hhs . fha . nhinc . patientcorrelation . nhinc . parsers . PRPAIN201301UV . PRPAIN201301UVParser parser = new gov . hhs . fha . nhinc . patientcorrelation . nhinc . parsers . PRPAIN201301UV . PRPAIN201301UVParser ( ) ; org . hl7 . v3 . PRPAIN201301UV02 message = null ;... | org . junit . Assert . assertNull ( subject1 ) |
testShorterSubstringIsBigger ( ) { byte [ ] b1 = org . apache . hadoop . hbase . util . Bytes . toBytes ( "ab" ) ; byte [ ] b2 = org . apache . hadoop . hbase . util . Bytes . toBytes ( "a" ) ; int cmp = org . apache . phoenix . execute . DescVarLengthFastByteComparisons . compareTo ( b1 , 0 , b1 . length , b2 , 0 , b2... | org . junit . Assert . assertTrue ( ( cmp < 0 ) ) |
testRemove ( ) { com . liferay . portal . kernel . model . Country newCountry = addCountry ( ) ; _persistence . remove ( newCountry ) ; com . liferay . portal . kernel . model . Country existingCountry = _persistence . fetchByPrimaryKey ( newCountry . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { ... | org . junit . Assert . assertNull ( existingCountry ) |
offHeapCache ( ) { "<AssertPlaceHolder>" ; } offHeapCache ( ) { org . junit . Assert . assertTrue ( ( ( com . cetsoft . imcache . cache . builder . CacheBuilder . offHeapCache ( ) ) instanceof com . cetsoft . imcache . cache . builder . OffHeapCacheBuilder ) ) ; } | org . junit . Assert . assertTrue ( ( ( com . cetsoft . imcache . cache . builder . CacheBuilder . offHeapCache ( ) ) instanceof com . cetsoft . imcache . cache . builder . OffHeapCacheBuilder ) ) |
testRequestServiceRequestType ( ) { emptyReq . setServiceRequestType ( "test" ) ; "<AssertPlaceHolder>" ; } getServiceRequestType ( ) { return this . serviceRequestType ; } | org . junit . Assert . assertEquals ( "test" , emptyReq . getServiceRequestType ( ) ) |
testGetParameterStringBooleanInt ( ) { org . owasp . esapi . filters . SecurityWrapperRequestTest . ValidatorTestContainer validatorTester = new org . owasp . esapi . filters . SecurityWrapperRequestTest . ValidatorTestContainer ( mockValidator ) ; validatorTester . getValidInputReturns ( testValueCanonical ) ; org . p... | org . junit . Assert . assertEquals ( testValueCanonical , rval ) |
accepts ( ) { java . util . LinkedList < org . jooby . MediaType > dataList = new java . util . LinkedList ( ) ; new org . jooby . RequestTest . RequestMock ( ) { @ org . jooby . Override public java . util . Optional < org . jooby . MediaType > accepts ( final java . util . List < org . jooby . MediaType > types ) { d... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( MediaType . json ) , dataList ) |
getAmenityObjectWithEmptyString ( ) { com . gisgraphy . domain . geoloc . entity . GisFeature o = osmAmenityToPlacetype . getAmenityObject ( "" ) ; "<AssertPlaceHolder>" ; } getAmenityObject ( java . lang . String ) { if ( isNonRealTag ( amenity ) ) { return null ; } com . gisgraphy . domain . geoloc . entity . GisFeat... | org . junit . Assert . assertEquals ( null , o ) |
parseWithHost ( ) { final com . azure . common . implementation . http . UrlBuilder builder = com . azure . common . implementation . http . UrlBuilder . parse ( "www.bing.com" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . value ; } | org . junit . Assert . assertEquals ( "www.bing.com" , builder . toString ( ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . calendar . model . Calendar . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . l... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
emptyArrayWithMessage ( ) { java . lang . String message = "array<sp>is<sp>empty" ; try { org . gitective . core . Assert . notEmpty ( message , new java . lang . Object [ 0 ] ) ; org . junit . Assert . fail ( "Illegal<sp>argument<sp>exception<sp>not<sp>thrown" ) ; } catch ( java . lang . IllegalArgumentException iae )... | org . junit . Assert . assertEquals ( message , iae . getMessage ( ) ) |
testRemove ( ) { com . liferay . portal . tools . service . builder . test . model . BigDecimalEntry newBigDecimalEntry = addBigDecimalEntry ( ) ; _persistence . remove ( newBigDecimalEntry ) ; com . liferay . portal . tools . service . builder . test . model . BigDecimalEntry existingBigDecimalEntry = _persistence . f... | org . junit . Assert . assertNull ( existingBigDecimalEntry ) |
testGetMaxResonStruc ( ) { org . openscience . cdk . charges . PiElectronegativity pe = new org . openscience . cdk . charges . PiElectronegativity ( ) ; "<AssertPlaceHolder>" ; } getMaxResonStruc ( ) { return maxRS ; } | org . junit . Assert . assertSame ( 50 , pe . getMaxResonStruc ( ) ) |
singleStringPropertyCanBeRetrieved ( ) { com . graphhopper . util . PMap subject = new com . graphhopper . util . PMap ( "foo=bar" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { if ( com . graphhopper . util . Helper . isEmpty ( key ) ) return "" ; java . lang . String val = map . get ( com . graphhopper ... | org . junit . Assert . assertEquals ( "bar" , subject . get ( "foo" ) ) |
testJavaToJson_nestedArray ( ) { java . lang . Object [ ] array = new java . lang . Object [ ] { Boolean . TRUE , new java . lang . Object [ ] { java . lang . Double . valueOf ( 5 ) , "foo" } } ; org . eclipse . rap . json . JsonValue result = org . eclipse . swt . internal . browser . browserkit . BrowserOperationHand... | org . junit . Assert . assertEquals ( expected , result ) |
shouldEqualsReturnTrueAndDoNotMakeInfinityCycleWith4Entities ( ) { final com . qcadoo . model . api . Entity secondEntity = new com . qcadoo . model . internal . DefaultEntity ( dataDefinition ) ; final com . qcadoo . model . api . Entity firstEntity = new com . qcadoo . model . internal . DefaultEntity ( dataDefinitio... | org . junit . Assert . assertEquals ( firstWrappedEntity , firstOtherWrappedEntity ) |
newDocumentWebHomeFromURLTemplateProviderSpecifiedTerminalOverriddenFromUIToNonTerminal ( ) { org . xwiki . model . reference . DocumentReference documentReference = new org . xwiki . model . reference . DocumentReference ( "WebHome" 1 , java . util . Arrays . asList ( "X" , "Y" ) , "WebHome" ) ; com . xpn . xwiki . do... | org . junit . Assert . assertNull ( result ) |
testParseStatusErr ( ) { queriesString = "type=node&enabled=true&status=other" ; target = new org . o3project . odenos . core . component . network . flow . query . BasicFlowQuery ( queriesString ) ; "<AssertPlaceHolder>" ; } parse ( ) { if ( ! ( super . parse ( ) ) ) { return false ; } if ( ! ( org . o3project . odeno... | org . junit . Assert . assertThat ( target . parse ( ) , org . hamcrest . CoreMatchers . is ( false ) ) |
toFillOut ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
testRemove ( ) { "<AssertPlaceHolder>" ; } of ( int [ ] , int , int ) { return one . util . streamex . IntStreamEx . of ( one . util . streamex . Arrays . spliterator ( array , startInclusive , endExclusive ) ) ; } | org . junit . Assert . assertArrayEquals ( new int [ ] { 1 , 2 } , one . util . streamex . IntStreamEx . of ( 1 , 2 , 3 ) . remove ( ( x ) -> x > 2 ) . toArray ( ) ) |
testSimplestPossibleServer ( ) { final de . saxsys . synchronizefx . core . clientserver . SynchronizeFxServer server = de . saxsys . synchronizefx . SynchronizeFxBuilder . create ( ) . server ( ) . model ( modelObject ) . callback ( serverCallback ) . modelChangeExecutor ( changeExecutor ) . build ( ) ; "<AssertPlaceH... | org . junit . Assert . assertNotNull ( server ) |
shouldIgnoreNullLints ( ) { final java . util . List < java . lang . String > lints = new java . util . ArrayList < java . lang . String > ( ) ; lints . add ( null ) ; lints . add ( null ) ; final ro . isdc . wro . extensions . support . lint . ResourceLintReport < java . lang . String > report = ro . isdc . wro . exte... | org . junit . Assert . assertTrue ( report . getLints ( ) . isEmpty ( ) ) |
testConvertBlank ( ) { java . lang . Float result = underTest . convert ( "<sp>" ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { if ( "S" . equalsIgnoreCase ( value ) ) { return Size . TINY ; } else if ( "M" . equalsIgnoreCase ( value ) ) { return Size . NORMAL ; } else if ( "L" . equalsIgnoreCase ( va... | org . junit . Assert . assertNull ( result ) |
testBerichtMetOverrulMetOverrulbareFouten3 ( ) { System . out . println ( "----<sp>testBerichtMetOverrulMetOverrulbareFouten3" ) ; nl . bzk . brp . business . dto . bijhouding . AbstractBijhoudingsBericht bericht = new nl . bzk . brp . business . dto . bijhouding . VerhuizingBericht ( ) ; nl . bzk . brp . business . dt... | org . junit . Assert . assertEquals ( true , resultaat . bevatVerwerkingStoppendeFouten ( ) ) |
statementGroupsCanBeNull ( ) { org . wikidata . wdtk . datamodel . implementation . PropertyDocument doc = new org . wikidata . wdtk . datamodel . implementation . PropertyDocumentImpl ( pid , labelList , descList , aliasList , null , datatypeId , 1234 ) ; "<AssertPlaceHolder>" ; } getStatementGroups ( ) { java . util ... | org . junit . Assert . assertEquals ( java . util . Collections . emptyList ( ) , doc . getStatementGroups ( ) ) |
testPublishFailureRetries_nonRetryableFailsImmediately ( ) { com . google . cloud . pubsub . v1 . Publisher publisher = getTestPublisherBuilder ( ) . setExecutorProvider ( com . google . cloud . pubsub . v1 . PublisherImplTest . SINGLE_THREAD_EXECUTOR ) . setRetrySettings ( Publisher . Builder . DEFAULT_RETRY_SETTINGS ... | org . junit . Assert . assertTrue ( ( ( testPublisherServiceImpl . getCapturedRequests ( ) . size ( ) ) >= 1 ) ) |
insertAfterDummyBr ( ) { html = org . mixer2 . xhtml . insert . InsertById_html5Test . m2e . loadHtmlTemplate ( new java . io . File ( templateFilePath ) ) ; html . insertAfterId ( "dummy_br" , "test" ) ; java . util . List < java . lang . Object > list = html . getById ( "footer" , org . mixer2 . jaxb . xhtml . Footer... | org . junit . Assert . assertEquals ( list . get ( ( i + 1 ) ) , "test" ) |
testContainsIpV6Addr ( ) { com . cloudera . director . aws . network . CidrBlock block = com . cloudera . director . aws . network . CidrBlock . fromString ( "2001:DB8:AC10:FE01::/64" ) ; java . net . InetAddress addr = com . google . common . net . InetAddresses . forString ( "2001:DB8:AC10:FE01:5:4::" ) ; "<AssertPla... | org . junit . Assert . assertTrue ( block . contains ( addr ) ) |
testExpansionNoParameters ( ) { org . davidmoten . rx . jdbc . SqlInfo s = org . davidmoten . rx . jdbc . SqlInfo . parse ( "?<sp>?" , java . util . Collections . emptyList ( ) ) ; "<AssertPlaceHolder>" ; } sql ( ) { return sql ; } | org . junit . Assert . assertEquals ( "?<sp>?" , s . sql ( ) ) |
testRDiv1 ( ) { lombok . val argX = org . nd4j . linalg . factory . Nd4j . create ( 3 ) . assign ( 2.0 ) ; lombok . val argY = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1.0 , 2.0 , 3.0 } ) ; lombok . val exp = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0.5 , 1.0 , 1.5 } ) ; ... | org . junit . Assert . assertEquals ( exp , res ) |
keep1Hisotopes ( ) { org . openscience . cdk . smiles . SmilesParser smipar = new org . openscience . cdk . smiles . SmilesParser ( org . openscience . cdk . silent . SilentChemObjectBuilder . getInstance ( ) ) ; org . openscience . cdk . interfaces . IAtomContainer mol = smipar . parseSmiles ( "[2H]/C=C/[1H]" ) ; org ... | org . junit . Assert . assertThat ( mol . getAtomCount ( ) , org . hamcrest . CoreMatchers . is ( 4 ) ) |
testGetRandomMatrix ( ) { java . util . Random rand1 = new java . util . Random ( 0 ) ; dk . alexandra . fresco . framework . util . BinaryMatrix binaryMatrix1 = new dk . alexandra . fresco . framework . util . BinaryMatrix ( 8 , 2 ) ; for ( int j = 0 ; j < ( binaryMatrix1 . getWidth ( ) ) ; j ++ ) { for ( int i = 0 ; ... | org . junit . Assert . assertEquals ( binaryMatrix1 , binaryMatrix2 ) |
testTopologyIds ( ) { java . util . List list = new java . util . ArrayList ( ) ; list . add ( org . onlab . packet . Ip4Address . valueOf ( "1.1.1.1" ) ) ; ospfDeviceTed . setTopologyIds ( list ) ; "<AssertPlaceHolder>" ; } topologyIds ( ) { return topologyIds ; } | org . junit . Assert . assertThat ( ospfDeviceTed . topologyIds ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
parseLineMultiAllowsQuotesAcrossMultipleLines ( ) { java . lang . String [ ] nextLine = csvParser . parseLineMulti ( "This,\"is<sp>a<sp>\"good\"<sp>line\\\\<sp>to<sp>parse" ) ; org . junit . Assert . assertEquals ( 1 , nextLine . length ) ; org . junit . Assert . assertEquals ( "This" , nextLine [ 0 ] ) ; org . junit .... | org . junit . Assert . assertFalse ( csvParser . isPending ( ) ) |
Test_analyzeTraceDirectory_returnIsPacketAnalyzerResult ( ) { iPacketAnalyzer . setEnergyModelFactory ( energymodelfactory ) ; iPacketAnalyzer . setBurstCollectionAnalayzer ( burstcollectionanalyzer ) ; iPacketAnalyzer . setRrcStateMachineFactory ( statemachinefactory ) ; iPacketAnalyzer . setProfileFactory ( profilefa... | org . junit . Assert . assertEquals ( null , testResult . getSessionlist ( ) ) |
test ( ) { org . multiverse . stms . gamma . transactionalobjects . GammaTxnLong ref = new org . multiverse . stms . gamma . transactionalobjects . GammaTxnLong ( stm , 10 ) ; org . multiverse . stms . gamma . transactions . GammaTxn tx = transactionFactory . newTxn ( ) ; long value = ref . get ( tx ) ; "<AssertPlaceHo... | org . junit . Assert . assertEquals ( 10 , value ) |
testPartitionValues ( ) { org . apache . kafka . common . internals . PartitionStates < java . lang . String > states = new org . apache . kafka . common . internals . PartitionStates ( ) ; java . util . LinkedHashMap < org . apache . kafka . common . TopicPartition , java . lang . String > map = createMap ( ) ; states... | org . junit . Assert . assertEquals ( expected , states . partitionStateValues ( ) ) |
testNewPipelineForProvider ( ) { org . guvnor . ala . pipeline . PipelineConfig pipelineConfig = mock ( org . guvnor . ala . pipeline . PipelineConfig . class ) ; when ( pipelineService . newPipeline ( pipelineConfig , providerType ) ) . thenReturn ( org . guvnor . ala . services . backend . impl . PipelineServiceBacke... | org . junit . Assert . assertEquals ( org . guvnor . ala . services . backend . impl . PipelineServiceBackendImplTest . PIPELINE_NAME , result ) |
testCoerceToType02 ( ) { java . lang . Object result = javax . el . ELManager . getExpressionFactory ( ) . coerceToType ( null , int . class ) ; "<AssertPlaceHolder>" ; } valueOf ( int ) { return org . apache . tomcat . util . net . jsse . openssl . Cipher . idMap . get ( java . lang . Integer . valueOf ( cipherId ) ) ... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 0 ) , result ) |
testMultiple ( ) { java . util . LinkedList < com . hp . alm . ali . idea . navigation . Candidate > list = new java . util . LinkedList < com . hp . alm . ali . idea . navigation . Candidate > ( ) ; java . lang . String value = "prefix<sp>at<sp>org.junit.runners.ParentRunner.run2(ParentRunner.java:230)<sp>suffix\n" + ... | org . junit . Assert . assertEquals ( 2 , list . size ( ) ) |
hasHeaderMatcherMatchesResponseWithMultipleHeadersAndMatchingHeader ( ) { com . spotify . apollo . Response < java . lang . Void > multiMatchingResponse = com . spotify . apollo . test . unit . ResponseMatchersTest . FOO_BAR_HEADER . withHeader ( "foo2" , "bar2" ) ; "<AssertPlaceHolder>" ; } hasHeader ( java . lang . S... | org . junit . Assert . assertThat ( multiMatchingResponse , hasHeader ( "foo" , org . hamcrest . CoreMatchers . is ( "bar" ) ) ) |
shouldGetBeanList ( ) { cn . jimmyshi . beanquery . selectors . BeanSelector < java . lang . String > stringBeanSelector = new cn . jimmyshi . beanquery . selectors . BeanSelector < java . lang . String > ( java . lang . String . class ) ; java . util . List < java . lang . String > result = stringBeanSelector . select... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . contains ( "ABC" , "EDF" ) ) |
deveObterIdLoteComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . evento . manifestacaodestinatario . NFEnviaEventoManifestacaoDestinatario eventoManifestacaoDestinatario = new com . fincatto . documentofiscal . nfe310 . classes . evento . manifestacaodestinatario . NFEnviaEventoManifestaca... | org . junit . Assert . assertEquals ( "1" , eventoManifestacaoDestinatario . getIdLote ( ) ) |
octahedralTest ( ) { org . openscience . cdk . interfaces . IAtom atomA = new org . openscience . cdk . Atom ( "C" , new javax . vecmath . Point3d ( 2 , 2 , 2 ) ) ; org . openscience . cdk . interfaces . IAtom atomB = new org . openscience . cdk . Atom ( "C" , new javax . vecmath . Point3d ( 2 , 2 , 1 ) ) ; org . opens... | org . junit . Assert . assertTrue ( org . openscience . cdk . stereo . StereoTool . isOctahedral ( atomA , atomB , atomC , atomD , atomE , atomF , atomG ) ) |
commitEmptyDirectory_theEmptyDirectoryShouldExistInTheFileSystemAfterTheOperation ( ) { writeSomethingToGfs ( ) ; java . nio . file . Path dir = gfs . getPath ( "/empty_dir" ) ; java . nio . file . Files . createDirectory ( dir ) ; com . beijunyi . parallelgit . filesystem . Gfs . commit ( gfs ) . execute ( ) ; "<Asser... | org . junit . Assert . assertTrue ( java . nio . file . Files . exists ( dir ) ) |
testGetChangesetsForTask ( ) { org . eclipse . mylyn . tasks . core . ITask task = mock ( org . eclipse . mylyn . tasks . core . ITask . class ) ; org . eclipse . mylyn . versions . tasks . mapper . generic . GenericTaskChangesetMapperTest . TestChangeSetMapping mapping = new org . eclipse . mylyn . versions . tasks . ... | org . junit . Assert . assertEquals ( 1 , mapping . getChangeSets ( ) . size ( ) ) |
construct_withFilledArgsAndNullCause ( ) { final net . sf . qualitycheck . exception . IllegalNotGreaterThanException e = new net . sf . qualitycheck . exception . IllegalNotGreaterThanException ( "a<sp>!=<sp>b" , 2 , ( ( java . lang . Throwable ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { final java . l... | org . junit . Assert . assertEquals ( "a<sp>!=<sp>b" , e . getMessage ( ) ) |
testGetUriWithFilterManyIdsWithSpaces ( ) { org . bson . BsonValue [ ] ids = new org . bson . BsonValue [ ] { new org . bson . BsonString ( "Three<sp>Imaginary<sp>Boys" ) , new org . bson . BsonString ( "Seventeen<sp>Seconds" ) } ; org . restheart . handlers . RequestContext context = prepareRequestContext ( ) ; java .... | org . junit . Assert . assertEquals ( expResult , result ) |
testGetUserByNameFound ( ) { java . lang . String testUserName = org . irods . jargon . core . pub . UserAOTest . testingProperties . getProperty ( TestingPropertiesHelper . IRODS_USER_KEY ) ; org . irods . jargon . core . connection . IRODSAccount irodsAccount = org . irods . jargon . core . pub . UserAOTest . testing... | org . junit . Assert . assertEquals ( testUserName , user . getName ( ) ) |
testZeroImaginary ( ) { org . apache . commons . math . complex . Complex c = new org . apache . commons . math . complex . Complex ( 30.233 , 0 ) ; java . lang . String expected = ( "30" + ( getDecimalCharacter ( ) ) ) + "23" ; java . lang . String actual = complexFormat . format ( c ) ; "<AssertPlaceHolder>" ; } form... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldAcceptEndOnly ( ) { com . couchbase . client . java . search . queries . DateRangeQuery fts = com . couchbase . client . java . search . SearchQuery . dateRange ( ) . end ( "theEnd" ) ; com . couchbase . client . java . search . SearchQuery query = new com . couchbase . client . java . search . SearchQuery ( "foo... | org . junit . Assert . assertEquals ( expected , query . export ( ) ) |
testClearReifier ( ) { net . ontopia . topicmaps . rest . model . Association association = get ( "5" , net . ontopia . topicmaps . rest . model . Association . class ) ; association . setReifier ( null ) ; net . ontopia . topicmaps . rest . model . Association changed = post ( "5" , association , net . ontopia . topic... | org . junit . Assert . assertNull ( changed . getReifier ( ) ) |
testLayout ( ) { edu . cmu . tetrad . graph . Dag dag = new edu . cmu . tetrad . graph . Dag ( ) ; edu . cmu . tetrad . graph . GraphNode x1 = new edu . cmu . tetrad . graph . GraphNode ( "X1" ) ; edu . cmu . tetrad . graph . GraphNode x2 = new edu . cmu . tetrad . graph . GraphNode ( "X2" ) ; edu . cmu . tetrad . grap... | org . junit . Assert . assertEquals ( dag , dag2 ) |
output_header ( ) { com . asakusafw . runtime . io . text . directio . AbstractTextStreamFormatTest . MockFormat format = format ( HeaderType . FORCE , "a" , "b" , "c" ) ; java . io . ByteArrayOutputStream output = new java . io . ByteArrayOutputStream ( ) ; try ( com . asakusafw . runtime . io . ModelOutput < java . l... | org . junit . Assert . assertThat ( com . asakusafw . runtime . io . text . directio . AbstractTextStreamFormatTest . deserialize ( output . toByteArray ( ) ) , is ( new java . lang . String [ ] [ ] { new java . lang . String [ ] { "a" , "b" , "c" } , new java . lang . String [ ] { "A" , "B" , "C" } , new java . lang .... |
testInputValidatorOverall ( ) { java . lang . String userInput = "\"bvv:gmd_ex\"<sp>WHERE<sp>bvv:objid=\'DEBYBDLMjK0001Ia\'\n" + "\"bvv:lkr_ex\"<sp>WHERE<sp>bvv:bez_krs=\'Ingolstadt\'" ; boolean result = controller . validateEcqlUserInput ( userInput , false ) ; "<AssertPlaceHolder>" ; } validateEcqlUserInput ( java . ... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) ) |
checkNumberOfHeroes ( ) { org . neo4j . graphdb . traversal . Traverser heroesTraverser = getHeroesViaRest ( ) ; int numberOfHeroes = 0 ; for ( org . neo4j . graphdb . Path heroPath : heroesTraverser ) { numberOfHeroes ++ ; } "<AssertPlaceHolder>" ; } getHeroesViaRest ( ) { org . neo4j . graphdb . traversal . Traversal... | org . junit . Assert . assertEquals ( 3 , numberOfHeroes ) |
testMBTilesWithoutJournal ( ) { java . io . File temp = java . io . File . createTempFile ( "temp2_" , ".mbtiles" ) ; org . geotools . mbtiles . MBTilesFile file = new org . geotools . mbtiles . MBTilesFile ( temp , true ) ; file . init ( ) ; final java . io . File journal = new java . io . File ( ( ( temp . getAbsolut... | org . junit . Assert . assertTrue ( ( ( counter . get ( ) ) == 0 ) ) |
currentNodeExpression ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = Current ( ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "@" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { return runtime . compile ( str ) ; } | org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) ) |
workdaysCountPolicySaturday ( ) { java . time . LocalDate date = java . time . LocalDate . of ( 2018 , 1 , 6 ) ; int daysToEndDate = 1 ; com . cronutils . utils . WeekendPolicy policy = WeekendPolicy . SATURDAY_SUNDAY ; int daysToWorkday = com . cronutils . utils . DateUtils . workdaysCount ( java . time . ZonedDateTim... | org . junit . Assert . assertEquals ( 0 , daysToWorkday ) |
shouldSetPropertyOfNullNestedProperty ( ) { org . apache . ibatis . reflection . MetaObject richWithNull = org . apache . ibatis . reflection . SystemMetaObject . forObject ( new org . apache . ibatis . domain . misc . RichType ( ) ) ; richWithNull . setValue ( "richType.richProperty" , "foo" ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertEquals ( "foo" , richWithNull . getValue ( "richType.richProperty" ) ) |
testZipAllWithFirstStreamLongerThanTheSecondOneAndCustomZipper ( ) { final org . jooq . lambda . Seq < java . lang . Integer > s1 = org . jooq . lambda . Seq . of ( 1 ) ; final org . jooq . lambda . Seq < java . lang . Integer > s2 = org . jooq . lambda . Seq . of ( 1 , 2 , 3 ) ; final org . jooq . lambda . Seq < java ... | org . junit . Assert . assertEquals ( expected . toList ( ) , actual . toList ( ) ) |
CapabilityTest ( ) { int registrationNum = registerAsResourceAlarmListener ( this ) ; alarmReceived = false ; generateWonesysAlarm ( sessionManager . obtainSessionByProtocol ( "wonesys" , false ) ) ; synchronized ( lock ) { org . opennaas . itests . roadm . alarms . MonitoringCapabilityTest . log . debug ( "Waiting<sp>... | org . junit . Assert . assertTrue ( alarmReceived ) |
findsAllNotes ( ) { java . util . List < me . j360 . boot . standard . domain . Note > notes = this . noteRepository . findAll ( ) ; "<AssertPlaceHolder>" ; } findAll ( ) { return this . entityManager . createQuery ( "SELECT<sp>n<sp>FROM<sp>Note<sp>n" , me . j360 . boot . standard . domain . Note . class ) . getResultL... | org . junit . Assert . assertEquals ( 4 , notes . size ( ) ) |
testKeyUsingSubsetOfBytes ( ) { org . apache . accumulo . core . data . Key keyBuilt = org . apache . accumulo . core . data . Key . builder ( ) . row ( rowBytes , 0 , ( ( rowBytes . length ) - 1 ) ) . build ( ) ; org . apache . accumulo . core . data . Key keyExpected = new org . apache . accumulo . core . data . Key ... | org . junit . Assert . assertEquals ( keyExpected , keyBuilt ) |
convert_string_to_inputstream_apache ( ) { java . io . InputStream inputStream = org . apache . commons . io . IOUtils . toInputStream ( com . levelup . java . io . StringToInputstream . PHRASE ) ; java . lang . StringBuffer phraseThroughStream = new java . lang . StringBuffer ( ) ; int c ; while ( ( c = inputStream . ... | org . junit . Assert . assertEquals ( phraseThroughStream . toString ( ) , com . levelup . java . io . StringToInputstream . PHRASE ) |
testGetTimeManager ( ) { org . openscience . smsd . tools . TimeManager expResult = new org . openscience . smsd . tools . TimeManager ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( expResult ) |
determinePriceModelType_CustomerTemplate ( ) { org . oscm . domobjects . PriceModel pm = givenPriceModel ( ServiceType . CUSTOMER_TEMPLATE ) ; org . oscm . serviceprovisioningservice . auditlog . PriceModelAuditLogOperation . PriceModelType type = logCollector . determinePriceModelType ( pm ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertEquals ( PriceModelType . CUSTOMER_SERVICE , type ) |
testFindLotNrs ( ) { java . lang . String prevention = "Flu" ; java . lang . String lotNr1 = "abcdef1" ; java . lang . String lotNr2 = "abcdef2" ; java . lang . String lotNr3 = "abcdef3" ; org . oscarehr . common . model . PreventionsLotNrs p1 = new org . oscarehr . common . model . PreventionsLotNrs ( ) ; org . oscare... | org . junit . Assert . assertTrue ( true ) |
testValidationExceptionValidationResult ( ) { org . apache . cayenne . validation . ValidationResult valResult = new org . apache . cayenne . validation . ValidationResult ( ) ; java . lang . String message = "Error<sp>message<sp>with<sp>a<sp>%<sp>literal<sp>(should<sp>be<sp>escaped)" ; valResult . addFailure ( new org... | org . junit . Assert . assertTrue ( e . getMessage ( ) . contains ( message ) ) |
testSizing ( ) { java . lang . Thread . currentThread ( ) . setContextClassLoader ( getClass ( ) . getClassLoader ( ) ) ; net . sf . ehcache . CacheManager cacheManager = net . sf . ehcache . CacheManager . getInstance ( ) ; net . sf . ehcache . Ehcache ehcache = cacheManager . getEhcache ( "testCache" ) ; for ( int i ... | org . junit . Assert . assertTrue ( true ) |
testAndorraPbf ( ) { runAlgo ( testCollector , ( ( com . graphhopper . GraphHopperIT . DIR ) + "/andorra.osm.pbf" ) , "target/andorra-gh" , createAndorra ( ) , "car" , true , "car" , "shortest" , false ) ; "<AssertPlaceHolder>" ; } toString ( ) { return "OSM<sp>File<sp>header:" + ( super . toString ( ) ) ; } | org . junit . Assert . assertEquals ( testCollector . toString ( ) , 0 , testCollector . errors . size ( ) ) |
readUserConversation_CacheMiss ( ) { final java . lang . String cacheKey = ai . labs . resources . impl . botmanagement . rest . RestUserConversationStore . calculateCacheKey ( intent , userId ) ; ai . labs . models . UserConversation expected = new ai . labs . models . UserConversation ( intent , userId , Deployment .... | org . junit . Assert . assertEquals ( expected , actual ) |
testFTPActionServiceGeneration ( ) { java . lang . Boolean actionServiceRegistered = false ; java . util . List < it . geosolutions . geobatch . annotations . GenericActionService > actionList = it . geosolutions . geobatch . annotations . ActionServicePostProcessor . getActionList ( ) ; for ( it . geosolutions . geoba... | org . junit . Assert . assertTrue ( actionServiceRegistered ) |
testVisitor ( ) { java . util . Set < org . geowebcache . diskquota . storage . TileSet > tileSets1 = store . getTileSets ( ) ; final java . util . Set < org . geowebcache . diskquota . storage . TileSet > tileSets2 = new java . util . HashSet < org . geowebcache . diskquota . storage . TileSet > ( ) ; store . accept (... | org . junit . Assert . assertEquals ( tileSets1 , tileSets2 ) |
testClientArea_withTextInItem_top ( ) { folder = new org . eclipse . swt . widgets . TabFolder ( shell , org . eclipse . swt . SWT . TOP ) ; folder . setSize ( 100 , 200 ) ; org . eclipse . swt . widgets . TabItem item = new org . eclipse . swt . widgets . TabItem ( folder , org . eclipse . swt . SWT . NONE ) ; item . ... | org . junit . Assert . assertEquals ( expected , folder . getClientArea ( ) ) |
checkSettingOpacityRGB ( ) { java . lang . String initial = "rgb(1,<sp>255,<sp>3)" ; org . openqa . selenium . support . Color actual = org . openqa . selenium . support . Color . fromString ( initial ) ; actual . setOpacity ( 0.5 ) ; java . lang . String expected = "rgba(1,<sp>255,<sp>3,<sp>0.5)" ; "<AssertPlaceHolder... | org . junit . Assert . assertEquals ( expected , actual . asRgba ( ) ) |
listDefaultCatalog ( ) { try { final org . commonjava . indy . autoprox . rest . dto . CatalogDTO catalog = module . getCatalog ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { logger . error ( "Test<sp>error" , e ) ; throw e ; } } isEnabled ( ) { return ( enabled ) == null ? org . commonjava . ind... | org . junit . Assert . assertThat ( catalog . isEnabled ( ) , org . hamcrest . CoreMatchers . equalTo ( true ) ) |
testValueReference ( ) { org . orbisgis . coremap . renderer . se . parameter . real . RealAttribute vf = new org . orbisgis . coremap . renderer . se . parameter . real . RealAttribute ( "height" ) ; org . orbisgis . coremap . renderer . se . parameter . string . Categorize2String c2s = new org . orbisgis . coremap . ... | org . junit . Assert . assertTrue ( ( ( cs . getValueReference ( ) ) == vf ) ) |
testMsg ( ) { final java . lang . String testMsg = "Test<sp>message<sp>{}" ; final org . apache . logging . log4j . message . StructuredDataMessage msg = new org . apache . logging . log4j . message . StructuredDataMessage ( "MsgId@12345" , testMsg , "Test<sp>message<sp>{}" 0 ) ; msg . put ( "Test<sp>message<sp>{}" 1 ,... | org . junit . Assert . assertEquals ( expected , result ) |
testMerge ( ) { com . xpn . xwiki . objects . BaseObject previousObject = new com . xpn . xwiki . objects . BaseObject ( ) ; previousObject . setStringValue ( "str" , "value" ) ; com . xpn . xwiki . objects . BaseObject nextObject = new com . xpn . xwiki . objects . BaseObject ( ) ; nextObject . setStringValue ( "str" ... | org . junit . Assert . assertEquals ( "newvalue" , currentObject . getStringValue ( "str" ) ) |
testIsIncluded_resourceOnly_notIncluded ( ) { final com . adobe . acs . commons . replication . dispatcher . DispatcherFlushFilter filter = new com . adobe . acs . commons . replication . dispatcher . DispatcherFlushFilter ( DispatcherFlushFilter . FlushType . ResourceOnly ) ; when ( agent . isEnabled ( ) ) . thenRetur... | org . junit . Assert . assertEquals ( expected , actual ) |
testIm2Col2 ( ) { int kh = 2 ; int kw = 2 ; int ph = 0 ; int pw = 0 ; int sy = 2 ; int sx = 2 ; int depth = 2 ; org . nd4j . linalg . api . ndarray . INDArray assertion = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 1 , 1 , 1 , 3 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 3 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 3 , ... | org . junit . Assert . assertEquals ( assertion , test ) |
testDeleteDirectory ( ) { java . nio . file . Path toDelete = root . resolve ( "deleteMe" ) ; java . nio . file . Files . createDirectory ( toDelete ) ; java . nio . file . Files . delete ( toDelete ) ; "<AssertPlaceHolder>" ; } delete ( java . nio . file . Path ) { getFs ( path ) . delete ( toEfsPath ( path ) ) ; } | org . junit . Assert . assertFalse ( java . nio . file . Files . exists ( toDelete ) ) |
testSenseNumber ( ) { gov . llnl . ontology . wordnet . Synset synset = new gov . llnl . ontology . wordnet . BaseSynset ( gov . llnl . ontology . wordnet . Synset . PartsOfSpeech . NOUN ) ; synset . setSenseNumber ( 1 ) ; "<AssertPlaceHolder>" ; } getSenseNumber ( ) { return senseNumber ; } | org . junit . Assert . assertEquals ( 1 , synset . getSenseNumber ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.