input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testEmptySecondLevelCacheEntry ( ) { sessionFactory ( ) . getCache ( ) . evictCollectionRegion ( ( ( org . infinispan . test . hibernate . cache . commons . functional . entities . Item . class . getName ( ) ) + ".items" ) ) ; org . hibernate . stat . Statistics stats = sessionFactory ( ) . getStatistics ( ) ; stats . ... | org . junit . Assert . assertEquals ( 0 , region . getElementCountInMemory ( ) ) |
assertSingleton ( ) { org . apache . camel . component . couchdb . CouchDbEndpoint endpoint = new org . apache . camel . component . couchdb . CouchDbEndpoint ( "couchdb:http://localhost/db" , "http://localhost/db" , new org . apache . camel . component . couchdb . CouchDbComponent ( ) ) ; "<AssertPlaceHolder>" ; } isS... | org . junit . Assert . assertTrue ( endpoint . isSingleton ( ) ) |
testGetAnnotationForMethodReturnsNullForNonExistentAnnotation ( ) { javax . inject . Qualifier result = io . joynr . util . AnnotationUtil . getAnnotation ( getMethodWithAnnotation ( ) , javax . inject . Qualifier . class ) ; "<AssertPlaceHolder>" ; } getMethodWithAnnotation ( ) { return io . joynr . util . AnnotationU... | org . junit . Assert . assertNull ( result ) |
getAllDependencies ( ) { com . liferay . ide . test . core . base . support . FileSupport fs = new com . liferay . ide . test . core . base . support . FileSupport ( "testDependencies.gradle" , false ) ; fs . before ( ) ; com . liferay . ide . gradle . core . parser . GradleDependencyUpdater updater = new com . liferay... | org . junit . Assert . assertEquals ( "" , 3 , allDependencies . size ( ) ) |
testBlobListAll ( ) { prefixes . clear ( ) ; includes . clear ( ) ; prefixes . add ( "" ) ; includes . add ( true ) ; remoteBlobs . prefix . setValue ( prefixes ) ; remoteBlobs . include . setValue ( includes ) ; listBlobs ( ) ; for ( java . lang . String blob : TEST_ALL_BLOBS ) "<AssertPlaceHolder>" ; } isInBlobList (... | org . junit . Assert . assertTrue ( isInBlobList ( blob , blobs ) ) |
groupLookupShouldInheritFieldsFromPreviousAggregationOperation ( ) { org . springframework . data . mongodb . core . aggregation . TypeBasedAggregationOperationContext context = getContext ( org . springframework . data . mongodb . core . aggregation . MeterData . class ) ; org . springframework . data . mongodb . core... | org . junit . Assert . assertThat ( definition . get ( "foreignKey" ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 1 ) ) ) |
testRegisterRepositorySources ( ) { sourceRegistry . registerRepositorySources ( path , repository ) ; java . util . List < org . guvnor . ala . source . Repository > result = sourceRegistry . getAllRepositories ( ) ; "<AssertPlaceHolder>" ; } contains ( T ) { return registryMap . containsKey ( keyProvider . apply ( it... | org . junit . Assert . assertTrue ( result . contains ( repository ) ) |
testAccessSignedValueFromUnsignedByte_Less128 ( ) { com . eclipsesource . v8 . V8TypedArray array = ( ( com . eclipsesource . v8 . V8TypedArray ) ( v8 . executeScript ( "var<sp>buf<sp>=<sp>new<sp>ArrayBuffer(8);<sp>var<sp>bytes<sp>=<sp>new<sp>Uint8Array(buf);<sp>bytes[0]<sp>=<sp>20;<sp>bytes[1]<sp>=<sp>7;<sp>bytes" ) )... | org . junit . Assert . assertEquals ( 20 , result ) |
readData_Exception_readAllLine ( ) { org . mockito . Mockito . when ( filereader . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( filereader . readAllLine ( org . mockito . Mockito . anyString ( ) ) ) . thenThrow ( new java . io . IOException ( "Exceptio... | org . junit . Assert . assertTrue ( ( ( info . size ( ) ) == 0 ) ) |
test_shouldNotRemoveApplicationButIgnoreError ( ) { connect ( ) ; try { org . springframework . shell . core . CommandResult result = removeApplication ( "dzqmodzq" , false ) ; "<AssertPlaceHolder>" ; } finally { disconnect ( ) ; } } isSuccessfulCommand ( ) { return new fr . treeptik . cloudunit . cli . integration . S... | org . junit . Assert . assertThat ( result , isSuccessfulCommand ( ) ) |
testMyClassName ( ) { java . lang . String fullName = getClass ( ) . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( java . lang . String ) { return org . zeroturnaround . exec . stream . CallerLoggerUtil . getName ( name , 1 ) ; } | org . junit . Assert . assertEquals ( fullName , org . zeroturnaround . exec . stream . CallerLoggerUtil . getName ( null ) ) |
determineCheckoutPath_defaultOnWindowsWithForwardSlashes ( ) { final hudson . remoting . VirtualChannel vc = mock ( hudson . remoting . VirtualChannel . class ) ; final java . lang . String windowsPath = "C:/.jenkins/jobs/tfs-plugin/workspace" ; final hudson . FilePath workspacePath = new hudson . FilePath ( vc , windo... | org . junit . Assert . assertEquals ( windowsPath , actual ) |
testOnSplashPotionSplashAllowPVP ( ) { when ( island . isAllowed ( org . mockito . Mockito . any ( ) ) ) . thenReturn ( true ) ; org . bukkit . entity . ThrownPotion tp = mock ( org . bukkit . entity . ThrownPotion . class ) ; when ( tp . getShooter ( ) ) . thenReturn ( player ) ; when ( tp . getWorld ( ) ) . thenRetur... | org . junit . Assert . assertFalse ( e . isCancelled ( ) ) |
testTrimUnsuccessful ( ) { com . facebook . common . references . CloseableReference < byte [ ] > arrayRef = mPool . get ( 7 ) ; mDelegatePool . trim ( MemoryTrimType . OnCloseToDalvikHeapLimit ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( ! ( mIsDone ) ) { throw new java . lang . IllegalStateException ( "Not<sp>yet<sp>... | org . junit . Assert . assertNotNull ( arrayRef . get ( ) ) |
testGetParametersWithDefaultEntityAndDisabledStatus ( ) { unit . setActive ( false ) ; org . lnu . is . domain . paper . usage . PaperUsage entity = new org . lnu . is . domain . paper . usage . PaperUsage ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < jav... | org . junit . Assert . assertEquals ( expected , actual ) |
testTranslateDTOToDBO ( ) { org . sagebionetworks . repo . model . dbo . loginlockout . DBOUnsuccessfulLoginLockout translatedDBO = org . sagebionetworks . repo . model . dbo . dao . UnsuccessfulLoginLockoutDAOImpl . translateDTOToDBO ( dto ) ; "<AssertPlaceHolder>" ; } translateDTOToDBO ( org . sagebionetworks . repo ... | org . junit . Assert . assertEquals ( dbo , translatedDBO ) |
testCanPrescribeIsFalseOnEmptyStringInstructions ( ) { org . oscarehr . common . model . Drug d = getTestDrug ( ) ; d . setSpecial ( "" ) ; "<AssertPlaceHolder>" ; } canPrescribe ( org . oscarehr . common . model . Drug ) { if ( d == null ) { org . oscarehr . managers . RxManager . logger . debug ( "drug<sp>was<sp>null... | org . junit . Assert . assertFalse ( canPrescribe ( d ) ) |
testWrapperToPrimtive ( ) { ma . glasnost . orika . MapperFactory factory = ma . glasnost . orika . test . MappingUtil . getMapperFactory ( ) ; factory . registerClassMap ( ma . glasnost . orika . metadata . ClassMapBuilder . map ( ma . glasnost . orika . test . primitives . BooleanTestCase . Wrapper . class , ma . gla... | org . junit . Assert . assertEquals ( true , destination . getWrapper ( ) ) |
serialize_ContainerWithLowAndHighValues_LowAndHighValuesSerialized ( ) { final com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . Pair < com . vaadin . data . provider . ListDataProvider < com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest ... | org . junit . Assert . assertEquals ( expected , actual ) |
createStoragePoolMappingsForVolumesTestCrossCluterMigration ( ) { java . util . ArrayList < com . cloud . storage . Volume > allVolumes = new java . util . ArrayList ( ) ; allVolumes . add ( volumeVoMock ) ; java . util . HashMap < com . cloud . storage . Volume , com . cloud . storage . StoragePool > volumeToPoolObjec... | org . junit . Assert . assertTrue ( volumeToPoolObjectMap . isEmpty ( ) ) |
twoBelow ( ) { set . set ( 1 ) ; final int ret = set . previousSetBit ( 3 ) ; "<AssertPlaceHolder>" ; } previousSetBit ( int ) { if ( i < 0 ) { if ( i == ( - 1 ) ) return - 1 ; throw new java . lang . IndexOutOfBoundsException ( ( "i=" + i ) ) ; } final long [ ] [ ] [ ] bits = this . bits ; final int aSize = ( bits . l... | org . junit . Assert . assertEquals ( 1 , ret ) |
getFirstOnEmpty ( ) { com . gs . collections . impl . lazy . CollectIterable < java . lang . Integer , java . lang . String > collect = new com . gs . collections . impl . lazy . CollectIterable ( com . gs . collections . impl . list . mutable . FastList . newList ( ) , String :: valueOf ) ; "<AssertPlaceHolder>" ; } g... | org . junit . Assert . assertNull ( collect . getFirst ( ) ) |
testIsPresentlyValidAfterNotOnOrAfter ( ) { org . w3c . dom . Element issuedAssertion = this . readDocument ( "/saml.xml" ) . getDocumentElement ( ) ; issuedAssertion . getElementsByTagName ( "saml2:Conditions" ) . item ( 0 ) . getAttributes ( ) . getNamedItem ( "NotOnOrAfter" ) . setNodeValue ( getNowWithOffset ( ( - ... | org . junit . Assert . assertFalse ( assertion . isPresentlyValid ( ) ) |
testConvertVarTypeToResolvedType ( ) { org . eclipse . jdt . core . IPackageFragment pack1 = sourceFolder . createPackageFragment ( "foo.bar" , false , null ) ; java . lang . StringBuilder buf = new java . lang . StringBuilder ( ) ; buf . append ( "package<sp>foo.bar;\n" ) ; buf . append ( "public<sp>class<sp>Test<sp>{... | org . junit . Assert . assertNotNull ( codeAction ) |
resetRemovesAllLoggingEvents ( ) { uk . org . lidalia . slf4jtest . TestLoggerFactory . getInstance ( ) . getLogger ( "name1" ) . info ( "hello" ) ; uk . org . lidalia . slf4jtest . TestLoggerFactory . reset ( ) ; "<AssertPlaceHolder>" ; } getLoggingEvents ( ) { return uk . org . lidalia . slf4jtest . TestLoggerFactory... | org . junit . Assert . assertThat ( uk . org . lidalia . slf4jtest . TestLoggerFactory . getLoggingEvents ( ) , org . hamcrest . CoreMatchers . is ( empty ( ) ) ) |
deveObterPercentualInterestadualComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMSUFDestino icmsUFDestino = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMSUFDestino ( ) ; final java . lang . String percentualInteres... | org . junit . Assert . assertEquals ( percentualInterestadual , icmsUFDestino . getPercentualInterestadual ( ) ) |
testUnknownInput ( ) { dspFactory . addCodec ( org . restcomm . media . core . codec . g711 . alaw . Encoder . class . getName ( ) ) ; dspFactory . addCodec ( org . restcomm . media . core . codec . g711 . alaw . Decoder . class . getName ( ) ) ; org . restcomm . media . core . component . dsp . Dsp dsp = dspFactory . ... | org . junit . Assert . assertEquals ( frame , frame2 ) |
testGetTrustReport ( ) { System . out . println ( "getTrustReport" ) ; com . intel . mtwilson . as . business . Collection < com . intel . mtwilson . as . business . Hostname > hostNames = null ; com . intel . mtwilson . as . business . ReportsBO instance = new com . intel . mtwilson . as . business . ReportsBO ( ) ; c... | org . junit . Assert . assertEquals ( expResult , result ) |
shouldBeEqualWhenUsingDefaults ( ) { javax . cache . configuration . Configuration config1 = new javax . cache . configuration . MutableConfiguration ( ) ; javax . cache . configuration . Configuration config2 = new javax . cache . configuration . MutableConfiguration ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( config1 , config2 ) |
testFileSystemInequivalence ( ) { org . apache . hadoop . conf . Configuration hadoopConf = createMock ( org . apache . hadoop . conf . Configuration . class ) ; org . apache . hadoop . fs . FileSystem fs = createMock ( org . apache . hadoop . fs . FileSystem . class ) ; org . apache . hadoop . fs . FileSystem other = ... | org . junit . Assert . assertFalse ( volume . equivalentFileSystems ( other ) ) |
testEndpointHasNoIasZoneInputCluster ( ) { when ( endpoint . getInputCluster ( ZclIasZoneCluster . CLUSTER_ID ) ) . thenReturn ( null ) ; org . eclipse . smarthome . core . thing . Channel channel = converter . getChannel ( thingUID , endpoint ) ; "<AssertPlaceHolder>" ; } getChannel ( org . eclipse . smarthome . core ... | org . junit . Assert . assertNull ( channel ) |
testParseFromBitwiseValueWithUpdateBitwiseValue ( ) { com . liferay . sharing . security . permission . SharingEntryAction updateSharingEntryAction = SharingEntryAction . UPDATE ; "<AssertPlaceHolder>" ; } parseFromBitwiseValue ( long ) { if ( java . util . Objects . equals ( com . liferay . sharing . security . permis... | org . junit . Assert . assertEquals ( updateSharingEntryAction , com . liferay . sharing . security . permission . SharingEntryAction . parseFromBitwiseValue ( updateSharingEntryAction . getBitwiseValue ( ) ) ) |
testReplaceLocation_renamingTable_none ( ) { final java . lang . String expression = "YYYZ.columnA<sp>==<sp>XXXYYY.columnA" ; java . lang . String result = expressionParser . replaceLocation ( expression , new org . talend . designer . mapper . model . tableentry . TableEntryLocation ( "YYY" , "columnA" ) , new org . t... | org . junit . Assert . assertEquals ( expression , result ) |
testIteratorEmpty ( ) { org . jsoup . nodes . Attributes a = new org . jsoup . nodes . Attributes ( ) ; java . util . Iterator < org . jsoup . nodes . Attribute > iterator = a . iterator ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( iterator . hasNext ( ) ) |
testSerialization ( ) { com . orsoncharts . renderer . category . AreaRenderer3D r1 = new com . orsoncharts . renderer . category . AreaRenderer3D ( ) ; com . orsoncharts . renderer . category . AreaRenderer3D r2 = ( ( com . orsoncharts . renderer . category . AreaRenderer3D ) ( com . orsoncharts . TestUtils . serializ... | org . junit . Assert . assertTrue ( r1 . equals ( r2 ) ) |
testLeeg ( ) { final nl . bzk . brp . util . hisvolledig . kern . PersoonHisVolledigImplBuilder builder = new nl . bzk . brp . util . hisvolledig . kern . PersoonHisVolledigImplBuilder ( nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortPersoon . INGESCHREVENE ) ; final nl . bzk . brp . model . hisvolledig ... | org . junit . Assert . assertNull ( brpInhoud ) |
testUserSearch ( ) { org . springframework . data . domain . Sort sort = new org . springframework . data . domain . Sort ( Sort . Direction . DESC , "createDate" ) . and ( new org . springframework . data . domain . Sort ( Sort . Direction . ASC , "id" ) ) ; org . springframework . data . domain . Pageable p = new org... | org . junit . Assert . assertFalse ( page . getContent ( ) . isEmpty ( ) ) |
testOsRelease2 ( ) { java . lang . String osReleaseReply = org . onosproject . drivers . microsemi . RpcResultParserTest . loadXml ( org . onosproject . drivers . microsemi . RpcResultParserTest . SAMPLE2_XML ) ; java . lang . String osRelease = org . onosproject . drivers . microsemi . RpcResultParser . parseXml ( osR... | org . junit . Assert . assertEquals ( null , osRelease ) |
shouldExportMatchPhraseQueryWithAllOptions ( ) { com . couchbase . client . java . search . queries . MatchPhraseQuery fts = com . couchbase . client . java . search . SearchQuery . matchPhrase ( "salty<sp>beers" ) . boost ( 1.5 ) . field ( "field" ) . analyzer ( "analyzer" ) ; com . couchbase . client . java . search ... | org . junit . Assert . assertEquals ( expected , query . export ( ) ) |
rick ( ) { java . lang . String signatureB64 = "MEQCIAwtk4DStr2MqkrAlOVG+nyQxbS6tnBpVi7OcKCm8/5lAiBjVsv+b+7nI/306iNHrso/ruOaxY8IJy3jw2/zr17JEQ==" ; java . math . BigInteger [ ] bigIntegerArray = org . ebayopensource . fido . uaf . crypto . Asn1 . decodeToBigIntegerArray ( org . apache . commons . codec . binary . Base6... | org . junit . Assert . assertTrue ( signatureB64 . equals ( encodeBackToBase64 ) ) |
testReverse2 ( ) { org . jerlang . type . List list = new org . jerlang . type . List ( org . jerlang . type . Atom . of ( "element" ) ) ; "<AssertPlaceHolder>" ; } reverse ( org . jerlang . type . List ) { return org . jerlang . stdlib . lists . ListsReverse . reverse_1 ( list ) ; } | org . junit . Assert . assertEquals ( list , org . jerlang . stdlib . Lists . reverse ( list ) ) |
getJavaKindTest ( ) { for ( Map . Entry < java . lang . reflect . Field , jdk . vm . ci . meta . ResolvedJavaField > e : fields . entrySet ( ) ) { jdk . vm . ci . meta . JavaKind expected = metaAccess . lookupJavaType ( e . getKey ( ) . getType ( ) ) . getJavaKind ( ) ; jdk . vm . ci . meta . JavaKind actual = e . getV... | org . junit . Assert . assertEquals ( expected , actual ) |
testStringCollectSet ( ) { io . cdap . cdap . api . data . schema . Schema schema = io . cdap . cdap . api . data . schema . Schema . recordOf ( "test" , Schema . Field . of ( "x" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . STRING ) ) ) ; io . cdap . plugin . batch . aggregator . function .... | org . junit . Assert . assertEquals ( expectedSet , set ) |
getAuthenticatedResource_authenticated_asNonSystemResource ( ) { final char [ ] password = generateUniquePassword ( ) ; final com . acciente . oacc . Resource authenticatableResource = generateAuthenticatableResource ( password ) ; accessControlContext . authenticate ( authenticatableResource , com . acciente . oacc . ... | org . junit . Assert . assertThat ( authenticatedResource , org . hamcrest . CoreMatchers . is ( authenticatableResource ) ) |
testGetters ( ) { gov . hhs . fha . nhinc . docsubmission . outbound . deferred . response . PassthroughOutboundDocSubmissionDeferredResponse passthruOrch = new gov . hhs . fha . nhinc . docsubmission . outbound . deferred . response . PassthroughOutboundDocSubmissionDeferredResponse ( ) ; "<AssertPlaceHolder>" ; } get... | org . junit . Assert . assertNotNull ( passthruOrch . getOutboundDocSubmissionDeferredResponseDelegate ( ) ) |
appliesBothConverters ( ) { org . mule . runtime . core . api . transformer . Transformer converter1 = new org . mule . runtime . core . internal . transformer . builder . MockConverterBuilder ( ) . from ( org . mule . runtime . core . api . config . TransformationServiceTestCase . dataTypeB ) . to ( org . mule . runti... | org . junit . Assert . assertTrue ( ( ( message . getPayload ( ) . getValue ( ) ) instanceof org . mule . runtime . core . api . config . TransformationServiceTestCase . D ) ) |
testBasicQueryFromWithEndParam ( ) { java . lang . String query = "select<sp>*<sp>from<sp>openTSDB.`(metric=warp.speed.test,<sp>aggregator=sum,<sp>start=47y-ago,<sp>end=1407165403000))`" ; "<AssertPlaceHolder>" ; } testSql ( java . lang . String ) { return org . apache . drill . test . BaseTestQuery . testRunAndPrint (... | org . junit . Assert . assertEquals ( 5 , testSql ( query ) ) |
testGetEventID ( ) { "<AssertPlaceHolder>" ; } getEventID ( ) { return eventID ; } | org . junit . Assert . assertNotNull ( e . getEventID ( ) ) |
testGetFromEmptyQueue ( ) { org . antlr . runtime . misc . FastQueue < java . lang . String > q = new org . antlr . runtime . misc . FastQueue < java . lang . String > ( ) ; java . lang . String msg = null ; try { q . remove ( ) ; } catch ( java . util . NoSuchElementException nsee ) { msg = nsee . getMessage ( ) ; } j... | org . junit . Assert . assertEquals ( expecting , found ) |
newlyWrittenFileMustNotBeDeletedDueToLateClose ( ) { org . apache . lucene . store . Directory cow1 = copier . getCoWDir ( ) ; writeFile ( cow1 , "a" ) ; cow1 . close ( ) ; org . apache . lucene . store . Directory cor1 = copier . getCoRDir ( ) ; org . apache . lucene . store . Directory cow2 = copier . getCoWDir ( ) ;... | org . junit . Assert . assertTrue ( existsLocally ( "fileX" ) ) |
testWriteRequestXML ( ) { System . out . println ( "writeRequestXML" ) ; org . wiztools . restclient . bean . RequestBean bean = getDefaultRequestBean ( ) ; java . io . File f = java . io . File . createTempFile ( "prefix" , ".rcq" ) ; pWrite . writeRequest ( bean , f ) ; org . wiztools . restclient . bean . Request ex... | org . junit . Assert . assertEquals ( expResult , bean ) |
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final java . lang . String xmlEsperado = "<NFInfoEventoCancelamento<sp>Id=\"hluU2zKt4QK5bEktOiGfpZw64535p2A4Z5m5egLQbMpjnCH48c1aw6\"><cOrgao>42</cOrgao><tpAmb>2</tpAmb><CNPJ>12345678901234</CNPJ><chNFe>81568004734874930428983724940883089298523837</chNFe><dhEvento>2014-01... | org . junit . Assert . assertEquals ( xmlEsperado , com . fincatto . documentofiscal . nfe310 . FabricaDeObjetosFake . getNFInfoEventoCancelamento ( ) . toString ( ) ) |
testConstructor ( ) { org . openhealthtools . mdht . uml . cda . ihe . operations . VitalSignsSectionOperations obj = new org . openhealthtools . mdht . uml . cda . ihe . operations . VitalSignsSectionOperations ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
atomicNumberIsNotCleared ( ) { org . openscience . cdk . interfaces . IAtomContainer container = org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) . newInstance ( org . openscience . cdk . interfaces . IAtomContainer . class ) ; org . openscience . cdk . interfaces . IAtom atom1 = org . openscience .... | org . junit . Assert . assertNotNull ( atom . getAtomicNumber ( ) ) |
testAddHeaderWithNoProlog ( ) { java . lang . String header = org . codehaus . mojo . license . header . transformer . XmlFileHeaderTransformerTest . HEADER ; java . lang . String content = org . codehaus . mojo . license . header . transformer . XmlFileHeaderTransformerTest . CONTENT ; java . lang . String result = tr... | org . junit . Assert . assertEquals ( ( header + content ) , result ) |
findFiles_vfs_hdfs ( ) { org . pentaho . hadoop . shim . common . DistributedCacheUtilImpl ch = new org . pentaho . hadoop . shim . common . DistributedCacheUtilImpl ( org . pentaho . hadoop . shim . common . DistributedCacheUtilImplTest . TEST_CONFIG ) ; java . net . URL url = new java . net . URL ( "http://localhost:... | org . junit . Assert . assertEquals ( 12 , files . size ( ) ) |
test_Filter19 ( ) { java . lang . String expected = "dfbcacbfd" ; java . lang . String actual ; org . osgi . framework . Bundle bundle = installBundle ( org . eclipse . equinox . http . servlet . tests . TEST_BUNDLE_1 ) ; try { bundle . start ( ) ; actual = requestAdvisor . request ( "TestFilter18/foo/bar/baz/with/path... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldReplaceArgumentWhenNameIsNull ( ) { com . oracle . bedrock . OptionsByType optionsByType = com . oracle . bedrock . OptionsByType . empty ( ) ; optionsByType . add ( com . oracle . bedrock . runtime . options . Argument . of ( "A1" , "A1" ) ) ; optionsByType . add ( com . oracle . bedrock . runtime . options . Ar... | org . junit . Assert . assertThat ( arguments . resolve ( null , null ) , contains ( "A1" , "A1" , "changed" , "A22" , "A3" , "A3" ) ) |
testGetRendition_MultiMatchingRegex ( ) { com . adobe . acs . commons . dam . RenditionPatternPicker instance = new com . adobe . acs . commons . dam . RenditionPatternPicker ( "^cq5dam\\.thumb*" ) ; com . day . cq . dam . api . Rendition expResult = largeRendition ; com . day . cq . dam . api . Rendition result = inst... | org . junit . Assert . assertEquals ( expResult , result ) |
verifyContentWithSeparateSignature ( ) { java . io . InputStream message = new java . io . ByteArrayInputStream ( "Test<sp>Message" . getBytes ( StandardCharsets . UTF_8 ) ) ; java . io . InputStream signature = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( "detached_signature.binary" ) ; "<AssertPla... | org . junit . Assert . assertNotNull ( signature ) |
InheritanceExtendsAbstractClass ( ) { java . lang . String fromClass = "Domain.Direct.Violating.InheritanceExtendsAbstractClass" ; java . lang . String toClass = "Technology.Direct.Dao.FriendsDAO" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ;... | org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , false ) ) |
serialize_ContainerWithLinePlotOptions_PlotOptionsAndTypeSerialized ( ) { com . vaadin . addon . charts . model . PlotOptionsLine plotOptions = new com . vaadin . addon . charts . model . PlotOptionsLine ( ) ; plotOptions . setShowInLegend ( true ) ; final com . vaadin . addon . charts . model . junittests . ChartDataS... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetName ( ) { boolean flag = odps . projects ( ) . exists ( "project_not_exist" ) ; "<AssertPlaceHolder>" ; } exists ( java . lang . String ) { return exists ( name , getDefaultProjectName ( ) ) ; } | org . junit . Assert . assertEquals ( false , flag ) |
testFindUser_valid_user ( ) { com . captaindebug . cargocult . User expected = new com . captaindebug . cargocult . User ( 0L , com . captaindebug . cargocult . ntier . UserServiceTest . NAME , "aaa@bbb.com" , new java . util . Date ( ) ) ; when ( userDao . findUser ( com . captaindebug . cargocult . ntier . UserServic... | org . junit . Assert . assertEquals ( expected , result ) |
testCanSetupDefaultValueWhenEditingPatternIsNull ( ) { when ( plugin . patternWrapper ( ) ) . thenReturn ( null ) ; "<AssertPlaceHolder>" ; } canSetupDefaultValue ( ) { if ( ! ( isDefaultValueEnabled ( ) ) ) { return false ; } if ( ( tableFormat ( ) ) != ( GuidedDecisionTable52 . TableFormat . EXTENDED_ENTRY ) ) { retu... | org . junit . Assert . assertFalse ( page . canSetupDefaultValue ( ) ) |
testCreateNodeWithNoField ( ) { try ( com . syncleus . ferma . tx . Tx tx = tx ( ) ) { com . gentics . mesh . core . rest . node . NodeResponse response = createNode ( com . gentics . mesh . core . field . date . DateFieldEndpointTest . FIELD_NAME , ( ( com . gentics . mesh . core . rest . node . field . Field ) ( null... | org . junit . Assert . assertNull ( field ) |
computeFactor_SummerTimeWeek ( ) { long startTimeUsage = org . oscm . test . DateTimeHandling . calculateMillis ( "2012-03-13<sp>00:00:00" ) ; long endTimeUsage = org . oscm . test . DateTimeHandling . calculateMillis ( "2012-03-25<sp>23:59:59" ) ; org . oscm . billingservice . service . model . BillingInput billingInp... | org . junit . Assert . assertEquals ( 2 , factor , 0 ) |
test ( ) { java . util . List < io . datakernel . bytebuf . ByteBuf > data = java . util . Arrays . asList ( io . datakernel . bytebuf . ByteBuf . wrapForReading ( "hello<sp>world,<sp>this<sp>is<sp>some<sp>lines<sp>of<sp>text<sp>to<sp>be<sp>encrypted,<sp>yaay!" . getBytes ( io . global . common . UTF_8 ) ) , io . datak... | org . junit . Assert . assertEquals ( data , decList ) |
testChangeTagMode ( ) { final java . lang . String tagName = "myTag" ; org . dcache . chimera . FsInode base = _rootInode . mkdir ( "junit" ) ; _fs . createTag ( base , tagName ) ; org . dcache . chimera . FsInode tagInode = new org . dcache . chimera . FsInode_TAG ( _fs , base . ino ( ) , tagName ) ; org . dcache . ch... | org . junit . Assert . assertEquals ( ( 7 | ( UnixPermission . S_IFREG ) ) , tagInode . stat ( ) . getMode ( ) ) |
testSerialization ( ) { org . jfree . chart . plot . MultiplePiePlot p1 = new org . jfree . chart . plot . MultiplePiePlot ( null ) ; p1 . setAggregatedItemsPaint ( new java . awt . GradientPaint ( 1.0F , 2.0F , java . awt . Color . yellow , 3.0F , 4.0F , java . awt . Color . RED ) ) ; java . io . ByteArrayOutputStream... | org . junit . Assert . assertEquals ( p1 , p2 ) |
testSetBytesWithNull ( ) { org . apache . qpid . jms . message . JmsMapMessage mapMessage = factory . createMapMessage ( ) ; java . lang . String name = "myName" ; mapMessage . setBytes ( name , null ) ; "<AssertPlaceHolder>" ; } getBytes ( java . lang . String ) { java . lang . Object value = getObject ( name ) ; if (... | org . junit . Assert . assertNull ( mapMessage . getBytes ( name ) ) |
testResolveUri ( ) { org . apache . beam . sdk . extensions . gcp . util . gcsfs . GcsPath path = org . apache . beam . sdk . extensions . gcp . util . gcsfs . GcsPath . fromComponents ( "bucket" , "a/b/c" ) ; org . apache . beam . sdk . extensions . gcp . util . gcsfs . GcsPath d = path . resolve ( "gs://bucket2/d" ) ... | org . junit . Assert . assertEquals ( "gs://bucket2/d" , d . toString ( ) ) |
updateBinAdminReferences ( ) { java . io . File binAdmin = new java . io . File ( git . getRepository ( ) . getWorkTree ( ) , "bin/admin" ) ; org . apache . commons . io . FileUtils . copyFile ( new java . io . File ( "src/test/resources/files/bin/admin" ) , binAdmin ) ; java . util . List < io . fabric8 . patch . mana... | org . junit . Assert . assertThat ( changed , org . hamcrest . CoreMatchers . equalTo ( expected ) ) |
whenReadUsingByteSource_thenRead ( ) { java . lang . String expectedValue = "Hello<sp>world" ; java . io . File file = new java . io . File ( "test.txt" ) ; com . github . mysite . common . guava . ByteSource source = com . github . mysite . common . guava . Files . asByteSource ( file ) ; byte [ ] result = source . re... | org . junit . Assert . assertEquals ( expectedValue , new java . lang . String ( result ) ) |
shouldRejectStatus ( ) { lb . setStatus ( "BUILD" ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( lb , org . openstack . atlas . api . validation . validators . POST ) ; "<AssertPlaceHolder>" ; } passedValidation ( ) { return expectationResultList . isEmpty ( )... | org . junit . Assert . assertFalse ( result . passedValidation ( ) ) |
testRepositorySystemHookEvent ( ) { org . gitlab4j . api . systemhooks . SystemHookEvent event = org . gitlab4j . api . JsonUtils . unmarshalResource ( org . gitlab4j . api . systemhooks . SystemHookEvent . class , "repository-system-hook-event.json" ) ; "<AssertPlaceHolder>" ; } compareJson ( T , java . lang . String ... | org . junit . Assert . assertTrue ( org . gitlab4j . api . JsonUtils . compareJson ( event , "repository-system-hook-event.json" ) ) |
testAccessBasicValue_longlong ( ) { org . omg . CORBA . TypeCode tc = orb . get_primitive_tc ( org . omg . CORBA . TCKind . tk_longlong ) ; org . omg . DynamicAny . DynAny dynAny = createDynAnyFromTypeCode ( tc ) ; java . lang . String msg = "Value<sp>inserted<sp>into<sp>DynAny<sp>object<sp>is<sp>not<sp>equal<sp>to<sp>... | org . junit . Assert . assertEquals ( msg , 700700L , dynAny . get_longlong ( ) ) |
shouldSetIsNetworkRoaming ( ) { org . robolectric . Shadows . shadowOf ( telephonyManager ) . setIsNetworkRoaming ( true ) ; "<AssertPlaceHolder>" ; } isNetworkRoaming ( ) { return isNetworkRoaming ; } | org . junit . Assert . assertTrue ( telephonyManager . isNetworkRoaming ( ) ) |
temp_qr ( ) { com . foxinmy . weixin4j . model . qr . QRResult result = qrApi . createQR ( com . foxinmy . weixin4j . model . qr . QRParameter . createTemporaryQR ( 1200 , 1200L ) ) ; "<AssertPlaceHolder>" ; } getTicket ( ) { return ticket ; } | org . junit . Assert . assertTrue ( ( ! ( result . getTicket ( ) . isEmpty ( ) ) ) ) |
testEmptyJsonFileInArrayFormat ( ) { try ( java . io . InputStream in = getJsonStream ( "org/ojai/test/data/emptyjsonfileinarrayformat.json" ) ; org . ojai . DocumentStream stream = org . ojai . json . Json . newDocumentStream ( in ) ) { int documentCount = getDocumentCount ( stream . documentReaders ( ) ) ; "<AssertPl... | org . junit . Assert . assertEquals ( 0 , documentCount ) |
nietUitvoerbaarAutorisatiesLeeg ( ) { org . springframework . test . util . ReflectionTestUtils . setField ( selectie , "selectietaakAutorisatieList" , emptyList ( ) ) ; "<AssertPlaceHolder>" ; } isUitvoerbaar ( ) { org . junit . Assert . assertTrue ( selectie . isUitvoerbaar ( ) ) ; } | org . junit . Assert . assertFalse ( selectie . isUitvoerbaar ( ) ) |
testAvailable ( ) { int port = 2000 ; boolean result = org . apache . usergrid . persistence . core . util . AvailablePortFinder . available ( port ) ; "<AssertPlaceHolder>" ; } available ( int ) { if ( ( port < ( org . apache . usergrid . persistence . core . util . AvailablePortFinder . MIN_PORT_NUMBER ) ) || ( port ... | org . junit . Assert . assertTrue ( result ) |
shouldIndicateHasSingleValue ( ) { prop = cars . getProperty ( "booleanProperty" ) ; javax . jcr . nodetype . PropertyDefinition def = prop . getDefinition ( ) ; "<AssertPlaceHolder>" ; } isMultiple ( ) { return true ; } | org . junit . Assert . assertThat ( def . isMultiple ( ) , org . hamcrest . core . Is . is ( false ) ) |
multiFieldTest ( ) { if ( org . apache . hyracks . storage . am . bloomfilter . LOGGER . isLoggable ( Level . INFO ) ) { org . apache . hyracks . storage . am . bloomfilter . LOGGER . info ( "TESTING<sp>BLOOM<sp>FILTER" ) ; } org . apache . hyracks . storage . common . buffercache . IBufferCache bufferCache = harness .... | org . junit . Assert . assertTrue ( bf . contains ( tuple , hashes ) ) |
testDateNotPresent ( ) { com . couchbase . jdbc . JDBCTestUtils . setConnection ( null ) ; java . lang . String drop_primary_index = "drop<sp>primary<sp>index<sp>on<sp>default" ; com . couchbase . jdbc . JDBCTestUtils . createPrimaryIndexes ( TestUtil . clusterInfo . bucketInformation . keySet ( ) ) ; org . json . simp... | org . junit . Assert . assertEquals ( expectatedMessage . trim ( ) , e . getMessage ( ) . trim ( ) ) |
testGetParamteresWithoutSecurity ( ) { unit . setSecurity ( false ) ; java . lang . Long personId = 1L ; org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; person . setId ( personId ) ; java . lang . Long contactTypeId = 2L ; org . lnu . is . domain . pension . type .... | org . junit . Assert . assertEquals ( expected . toString ( ) , actual . toString ( ) ) |
jarUriWithHttpStringifiesToOriginalForm ( ) { org . eclipse . rdf4j . common . net . ParsedURI uri = new org . eclipse . rdf4j . common . net . ParsedURI ( "jar:http://example.test/bar/baz.jar!/COM/foo/Quux.class" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return getName ( ) ; } | org . junit . Assert . assertEquals ( "jar:http://example.test/bar/baz.jar!/COM/foo/Quux.class" , uri . toString ( ) ) |
findByUserIdTest ( ) { me . xiezefan . easyim . server . model . User friend1 = userDao . findById ( Contact . USER_ID2 ) ; me . xiezefan . easyim . server . model . User friend2 = userDao . findById ( Contact . USER_ID3 ) ; me . xiezefan . easyim . server . model . Friendship friendship1 = new me . xiezefan . easyim .... | org . junit . Assert . assertTrue ( ( ( list . size ( ) ) == 2 ) ) |
testCoerceNullToNumber ( ) { java . lang . Object output = org . apache . el . lang . ELSupport . coerceToType ( null , org . apache . el . lang . Number . class ) ; "<AssertPlaceHolder>" ; } coerceToType ( java . lang . Object , java . lang . Class ) { if ( ( ( type == null ) || ( java . lang . Object . class . equals... | org . junit . Assert . assertNull ( output ) |
reconstructFormattingElementsInTable ( ) { java . lang . String h = "<p><b>One</p><sp><table><tr><td><p><i>Three<p>Four</i></td></tr></table><sp><p>Five</p>" ; org . jsoup . parser . Document doc = org . jsoup . Jsoup . parse ( h ) ; java . lang . String want = "<p><b>One</b></p>\n" + ( ( ( ( ( ( ( "<b><sp>\n" + "<sp><... | org . junit . Assert . assertEquals ( want , doc . body ( ) . html ( ) ) |
testNoSnapshotReportPlugins ( ) { org . apache . maven . shared . release . config . ReleaseDescriptorBuilder builder = new org . apache . maven . shared . release . config . ReleaseDescriptorBuilder ( ) ; java . util . List < org . apache . maven . project . MavenProject > reactorProjects = createDescriptorFromProject... | org . junit . Assert . assertTrue ( true ) |
shouldNeverRunTheSameTestTwice ( ) { queue . addAll ( asList ( "test1" , "test2" , "test1" ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 2 , queue . size ( ) ) |
allRegionsAreSortedCorrectly ( ) { final com . google . common . collect . SortedSetMultimap < java . lang . String , com . hartwig . hmftools . common . region . HmfTranscriptRegion > geneRegions = com . hartwig . hmftools . common . genepanel . HmfGenePanelSupplier . allGenesPerChromosomeMap37 ( ) ; for ( final java ... | org . junit . Assert . assertTrue ( ( ( hmfTranscriptRegion . start ( ) ) >= start ) ) |
shouldConsiderNodeToBeAtOrAboveItself ( ) { "<AssertPlaceHolder>" ; } isAtOrAbove ( org . modeshape . jcr . value . Path ) { org . modeshape . common . util . CheckArg . isNotNull ( other , "other" ) ; return other . isAtOrBelow ( this ) ; } | org . junit . Assert . assertThat ( path . isAtOrAbove ( path ) , org . hamcrest . core . Is . is ( true ) ) |
givenTwoEmptyOptionals_whenChaining_thenDefaultIsReturned ( ) { java . lang . String found = java . util . stream . Stream . < java . util . function . Supplier < java . util . Optional < java . lang . String > > > of ( ( ) -> createOptional ( "empty" ) , ( ) -> createOptional ( "empty" ) ) . map ( Supplier :: get ) . ... | org . junit . Assert . assertEquals ( "default" , found ) |
perfTest ( ) { final org . csstudio . apputil . test . TestProperties settings = new org . csstudio . apputil . test . TestProperties ( ) ; final java . lang . String url = settings . getString ( org . csstudio . logging . jms2rdb . RDBPerfUnitTest . MSG_LOG_URL ) ; final java . lang . String schema = settings . getStr... | org . junit . Assert . assertTrue ( ( count > 1000 ) ) |
testEdmWithtestEdmWithActionAndFunctionImport ( ) { try { java . io . InputStream stream = new java . io . ByteArrayInputStream ( org . apache . olingo . client . core . MetadataValidationTest . xmlWithActionsAndFunctionsHavingReturnedEntitiesInDiffNamespace . getBytes ( "UTF-8" ) ) ; final org . apache . olingo . comm... | org . junit . Assert . assertNotNull ( edm ) |
subclassWithNoopSetter ( ) { class NoopSetterRuleKeyBuilder extends com . facebook . buck . rules . keys . UncachedRuleKeyBuilder { public NoopSetterRuleKeyBuilder ( com . facebook . buck . core . rules . SourcePathRuleFinder ruleFinder , com . facebook . buck . core . sourcepath . resolver . SourcePathResolver pathRes... | org . junit . Assert . assertThat ( noopRuleKey , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( nullRuleKey ) ) ) |
read ( ) { com . asakusafw . runtime . io . json . value . FloatOptionPropertyAdapter adapter = builder . build ( ) ; com . asakusafw . runtime . value . FloatOption option = new com . asakusafw . runtime . value . FloatOption ( ) ; adapter . read ( new com . asakusafw . runtime . io . json . value . MockValue ( 1.0F )... | org . junit . Assert . assertThat ( option , is ( new com . asakusafw . runtime . value . FloatOption ( 1.0F ) ) ) |
testBNode ( ) { org . openrdf . model . BNode node = f . createBNode ( "identifier" ) ; byte [ ] bytesNode = nl . erdf . datalayer . hbase . NodeSerializer . toBytes ( node ) ; org . openrdf . model . BNode nodeB = ( ( org . openrdf . model . BNode ) ( nl . erdf . datalayer . hbase . NodeSerializer . fromBytes ( bytesN... | org . junit . Assert . assertTrue ( node . equals ( nodeB ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.