input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testBuildJobNoBuildParameters ( ) { com . kylenicholls . stash . parameterizedbuilds . item . Job actual = new com . kylenicholls . stash . parameterizedbuilds . item . Job . JobBuilder ( 0 ) . buildParameters ( "" ) . build ( ) ; "<AssertPlaceHolder>" ; } getBuildParameters ( ) { return buildParameters ; } | org . junit . Assert . assertEquals ( 0 , actual . getBuildParameters ( ) . size ( ) ) |
testNd4jReadWriteText ( ) { java . io . File dir = testDir . newFolder ( ) ; int count = 0 ; for ( lombok . val testShape : new long [ ] [ ] { new long [ ] { 1 , 1 } , new long [ ] { 3 , 1 } , new long [ ] { 4 , 5 } , new long [ ] { 1 , 2 , 3 } , new long [ ] { 2 , 1 , 3 } , new long [ ] { 2 , 3 , 1 } , new long [ ] { ... | org . junit . Assert . assertEquals ( p . getFirst ( ) , read ) |
forumNotAllowedShouldDeny ( ) { when ( userSession . getRoleManager ( ) ) . thenReturn ( roleManager ) ; when ( request . getParameter ( "forumId" ) ) . thenReturn ( "1" ) ; when ( roleManager . isForumAllowed ( 1 ) ) . thenReturn ( false ) ; when ( repository . get ( 1 ) ) . thenReturn ( new net . jforum . entities . ... | org . junit . Assert . assertFalse ( rule . shouldProceed ( userSession , request ) ) |
testGetReferenceKey ( ) { System . out . println ( "getReferenceKey" ) ; kg . apc . jmeter . functions . DoubleSum instance = new kg . apc . jmeter . functions . DoubleSum ( ) ; java . lang . String expResult = "__doubleSum" ; java . lang . String result = instance . getReferenceKey ( ) ; "<AssertPlaceHolder>" ; } getR... | org . junit . Assert . assertEquals ( expResult , result ) |
assertPreconditions ( ) { "<AssertPlaceHolder>" ; } getMockContext ( ) { return super . getMockContext ( ) ; } | org . junit . Assert . assertNotNull ( getMockContext ( ) ) |
shouldReturnResultsWithStreamForGivenCriteriaQuery ( ) { com . github . vanroy . springdata . jest . List < com . github . vanroy . springdata . jest . IndexQuery > entities = com . github . vanroy . springdata . jest . JestElasticsearchTemplateTests . createSampleEntitiesWithMessage ( "Test<sp>message" , 30 ) ; elasti... | org . junit . Assert . assertThat ( sampleEntities . size ( ) , is ( equalTo ( 30 ) ) ) |
testDoesNotEqualFirstNull ( ) { com . rmn . pairwise . Molecule molecule1 = new com . rmn . pairwise . Molecule ( null ) ; com . rmn . pairwise . Molecule molecule2 = new com . rmn . pairwise . Molecule ( new int [ ] { 1 , 0 } ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return t... | org . junit . Assert . assertFalse ( molecule1 . equals ( molecule2 ) ) |
testGetAssertion ( ) { gov . hhs . fha . nhinc . orchestration . Orchestratable instance = new gov . hhs . fha . nhinc . orchestration . OrchestratableTest . OrchestratableImpl ( ) ; gov . hhs . fha . nhinc . common . nhinccommon . AssertionType expResult = null ; gov . hhs . fha . nhinc . common . nhinccommon . Assert... | org . junit . Assert . assertEquals ( expResult , result ) |
testGetMissing ( ) { com . eclipsesource . v8 . utils . V8Map < java . lang . String > map = new com . eclipsesource . v8 . utils . V8Map < java . lang . String > ( ) ; v8 . executeVoidScript ( "var<sp>x<sp>=<sp>{}" ) ; com . eclipsesource . v8 . V8Object v8Object = v8 . getObject ( "x" ) ; "<AssertPlaceHolder>" ; v8Ob... | org . junit . Assert . assertNull ( map . get ( v8Object ) ) |
testHelloWorldWithResource ( ) { org . kie . api . KieServices ks = KieServices . Factory . get ( ) ; org . kie . api . builder . KieFileSystem kfs = ks . newKieFileSystem ( ) . write ( ks . getResources ( ) . newReaderResource ( new java . io . StringReader ( createDrl ( "R1" ) ) ) . setResourceType ( ResourceType . D... | org . junit . Assert . assertEquals ( 1 , count ) |
return_empty_sorted_map_guava ( ) { java . util . Map < java . lang . String , java . lang . String > sortedEmptyMap = com . google . common . collect . ImmutableSortedMap . of ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( sortedEmptyMap . isEmpty ( ) ) |
dateProcedure ( ) { com . gs . collections . api . block . procedure . Procedure < java . util . Date > procedure = new com . gs . collections . impl . block . procedure . checked . CheckedProcedure < java . util . Date > ( ) { @ com . gs . collections . impl . block . procedure . checked . Override public void safeVal... | org . junit . Assert . assertNotNull ( date . toString ( ) ) |
returnsTrueWhenRecursiveFilesAreEqualInBothDirectores ( ) { java . nio . file . Path eq1 = java . nio . file . Paths . get ( getClass ( ) . getResource ( "/uk/ac/ic/wlgitbridge/snapshot/servermock/util/FileUtilTest/returnsTrueWhenRecursiveFilesAreEqualInBothDirectories/eq1" ) . toURI ( ) ) ; java . nio . file . Path eq... | org . junit . Assert . assertTrue ( uk . ac . ic . wlgitbridge . snapshot . servermock . util . FileUtil . gitDirectoriesAreEqual ( eq1 , eq2 ) ) |
test57196_Detail2 ( ) { org . apache . poi . xssf . usermodel . XSSFWorkbook wb = new org . apache . poi . xssf . usermodel . XSSFWorkbook ( ) ; org . apache . poi . xssf . usermodel . XSSFSheet sheet = wb . createSheet ( "Sheet1" ) ; org . apache . poi . xssf . usermodel . XSSFRow row = sheet . createRow ( 0 ) ; org .... | org . junit . Assert . assertNotNull ( cv ) |
testGetDatasetProperties ( ) { "<AssertPlaceHolder>" ; } getDatasetProperties ( ) { return datasetRef . getReference ( ) ; } | org . junit . Assert . assertNotNull ( props . getDatasetProperties ( ) ) |
testDeleteThumbnail ( ) { try ( java . sql . Connection con = getSafeConnection ( ) ) { java . lang . String instanceId = "kmelia57" ; int objectId = 999999 ; int objectType = ThumbnailDetail . THUMBNAIL_OBJECTTYPE_PUBLICATION_VIGNETTE ; java . lang . String mimeType = "image/jpeg" ; java . lang . String originalFileNa... | org . junit . Assert . assertNull ( result ) |
test206ResponseIsNotCombinedWithPreviousContentIfETagDoesNotMatch ( ) { final java . util . Date now = new java . util . Date ( ) ; final org . apache . hc . core5 . http . ClassicHttpRequest req1 = new org . apache . hc . core5 . http . message . BasicClassicHttpRequest ( "GET" , "Partial<sp>Content" 1 ) ; final org .... | org . junit . Assert . assertFalse ( ( found1 && found2 ) ) |
testSimple ( ) { int portA = org . wildfly . camel . test . common . utils . AvailablePortFinder . getNextAvailable ( ) ; "<AssertPlaceHolder>" ; } getNextAvailable ( ) { return org . wildfly . camel . test . common . utils . AvailablePortFinder . getNextAvailable ( org . wildfly . camel . test . common . utils . Avail... | org . junit . Assert . assertTrue ( ( portA >= ( org . wildfly . camel . test . common . utils . AvailablePortFinder . MIN_PORT_NUMBER ) ) ) |
testSearchForMatchingEforms ( ) { org . oscarehr . PMmodule . wlmatch . CriteriasBO crits = new org . oscarehr . PMmodule . wlmatch . CriteriasBO ( ) ; org . oscarehr . PMmodule . wlmatch . CriteriaBO crit = new org . oscarehr . PMmodule . wlmatch . CriteriaBO ( ) ; crit . value = "test" ; org . oscarehr . PMmodule . w... | org . junit . Assert . assertEquals ( 0 , dao . searchForMatchingEforms ( crits ) . size ( ) ) |
createLiferayFacesAlloy ( ) { wizardAction . openNewLiferayJsfProjectWizard ( ) ; wizardAction . newLiferayJsf . prepareMaven ( project . getName ( ) , com . liferay . ide . ui . jsf . tests . LIFERAY_FACES_ALLOY ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningProjectBuildingJobs ( ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( project . getName ( ) ) ) |
testGetVersionParts ( ) { org . owasp . dependencycheck . utils . DependencyVersion instance = new org . owasp . dependencycheck . utils . DependencyVersion ( ) ; java . util . List < java . lang . String > versionParts = java . util . Arrays . asList ( "1" , "1" , "1" ) ; instance . setVersionParts ( versionParts ) ; ... | org . junit . Assert . assertEquals ( expResult , result ) |
testNonFoundResponse ( ) { com . spotify . folsom . client . ascii . IncrRequest req = com . spotify . folsom . client . ascii . IncrRequest . createIncr ( "foo" . getBytes ( Charsets . UTF_8 ) , 2 ) ; req . handle ( AsciiResponse . NOT_FOUND ) ; "<AssertPlaceHolder>" ; } createIncr ( byte [ ] , long ) { return new com... | org . junit . Assert . assertEquals ( null , req . get ( ) ) |
testProcessListSuccess ( ) { java . util . List < java . lang . Long > longList = com . google . common . collect . Lists . newArrayList ( java . util . stream . LongStream . range ( 0L , 10L ) . iterator ( ) ) ; java . util . List < java . lang . Long > expectedList = com . google . common . collect . Lists . transfor... | org . junit . Assert . assertEquals ( expectedList , org . apache . distributedlog . common . concurrent . FutureUtils . result ( totalFuture ) ) |
plusInPath ( ) { final java . util . concurrent . atomic . AtomicReference < java . lang . String > path = new java . util . concurrent . atomic . AtomicReference ( ) ; final java . lang . ClassLoader jaasLoader = new java . net . URLClassLoader ( new java . net . URL [ 0 ] ) { @ org . apache . openejb . core . securit... | org . junit . Assert . assertEquals ( "file:/tmp/jaas/folder+with+plus/login.config" , config ) |
encodeAlertNotification ( ) { com . cloudhopper . smpp . transcoder . AlertNotification pdu0 = new com . cloudhopper . smpp . transcoder . AlertNotification ( ) ; pdu0 . setSequenceNumber ( 20456 ) ; pdu0 . setCommandStatus ( 2 ) ; pdu0 . setSourceAddress ( new com . cloudhopper . smpp . type . Address ( ( ( byte ) ( 1... | org . junit . Assert . assertEquals ( expectedHex , actualHex ) |
autoloadJavaTimeConverters ( ) { io . beanmother . core . converter . ConverterFactory converterFactory = new io . beanmother . core . converter . ConverterFactory ( ) ; io . beanmother . core . converter . Converter converter = converterFactory . get ( new java . util . Date ( ) , com . google . common . reflect . Typ... | org . junit . Assert . assertNotNull ( converter ) |
addNonEmptyROIToEmpty ( ) { org . jaitools . imageutils . ROIGeometry nonEmpty = createRectROI ( 0 , 0 , 10 , 10 ) ; org . jaitools . imageutils . ROIGeometry empty = createEmptyROI ( ) ; javax . media . jai . ROI result = empty . add ( nonEmpty ) ; "<AssertPlaceHolder>" ; } getBounds ( ) { return new java . awt . Rect... | org . junit . Assert . assertTrue ( result . getBounds ( ) . equals ( nonEmpty . getBounds ( ) ) ) |
shouldCreateOneMoreRecordThanEvents ( ) { org . openstack . atlas . usagerefactor . List < org . openstack . atlas . usagerefactor . generator . GeneratorPojo > generatorPojos = new org . openstack . atlas . usagerefactor . ArrayList < org . openstack . atlas . usagerefactor . generator . GeneratorPojo > ( ) ; generato... | org . junit . Assert . assertEquals ( 6 , processedUsages . size ( ) ) |
parse_params_null ( ) { com . psddev . dari . db . Predicate pred = parser . parse ( "b<sp>=<sp>?" , ( ( java . lang . Object ) ( null ) ) ) ; com . psddev . dari . db . Predicate expect = new com . psddev . dari . db . ComparisonPredicate ( PredicateParser . EQUALS_ANY_OPERATOR , false , "b" , null ) ; "<AssertPlaceHo... | org . junit . Assert . assertEquals ( expect , pred ) |
test02_fromSpec ( ) { java . util . List < com . liferay . faces . util . config . internal . FacesConfigDescriptor > facesConfigDescriptors = new java . util . ArrayList < com . liferay . faces . util . config . internal . FacesConfigDescriptor > ( ) ; com . liferay . faces . util . xml . OrderingTest . parseConfigura... | org . junit . Assert . assertTrue ( message , expected . equals ( actually ) ) |
testLSTMGlobalPoolingBasicMultiLayer ( ) { org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345L ) ; int timeSeriesLength = 10 ; int nIn = 5 ; int layerSize = 4 ; int nOut = 2 ; int [ ] minibatchSizes = new int [ ] { 1 , 3 } ; org . deeplearning4j . gradientcheck . PoolingType [ ] poolingTypes = new o... | org . junit . Assert . assertTrue ( gradOK ) |
testVstackWithMatrices ( ) { org . nd4j . linalg . api . ndarray . INDArray [ ] arr = new org . nd4j . linalg . api . ndarray . INDArray [ 3 ] ; arr [ 0 ] = org . nd4j . linalg . factory . Nd4j . linspace ( 0 , 49 , 50 ) . reshape ( 'c' , 5 , 10 ) ; arr [ 1 ] = org . nd4j . linalg . factory . Nd4j . linspace ( 50 , 59 ... | org . junit . Assert . assertEquals ( expected , actual ) |
testLSFound ( ) { org . eclipse . core . resources . IProject project = getProject ( org . eclipse . corrosion . tests . BASIC_PROJECT_NAME ) ; org . eclipse . core . resources . IFile rustFile = project . getFolder ( "src" ) . getFile ( "main.rs" ) ; java . util . concurrent . CompletableFuture < org . eclipse . lsp4j... | org . junit . Assert . assertNotNull ( completionItems ) |
testParsePeerDownNotification ( ) { final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bmp . message . rev180329 . PeerDownNotification parsedPeerDownNotif = ( ( org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bmp . message . rev180329 . P... | org . junit . Assert . assertEquals ( org . opendaylight . protocol . bmp . parser . message . TestUtil . createPeerDownNotification ( ) , parsedPeerDownNotif ) |
checkUriEqualsNoResourceWithoutNodeOtherWithNode ( ) { final com . calclab . emite . core . XmppURI uri = com . calclab . emite . core . XmppURI . uri ( "localhost/resource1" ) ; final com . calclab . emite . core . XmppURI uri2 = com . calclab . emite . core . XmppURI . uri ( "test@localhost/resource2" ) ; "<AssertPla... | org . junit . Assert . assertFalse ( uri . equalsNoResource ( uri2 ) ) |
isAuthorizedWeb ( ) { final java . lang . String appName = "applicationName" ; final java . lang . String moduleName = "moduleName" ; final java . lang . String uriName = "/test/*" ; final java . lang . String method = "GET" ; final javax . security . auth . Subject subject = new javax . security . auth . Subject ( ) ;... | org . junit . Assert . assertFalse ( jaccService . isAuthorized ( appName , moduleName , uriName , method , req , subject ) ) |
testInfiniteLoop ( ) { final org . apache . commons . cli . Options options = new org . apache . commons . cli . Options ( ) ; options . addOption ( "h" , "help" , false , "This<sp>is<sp>a<sp>looooong<sp>description" ) ; formatter . printHelp ( new java . io . PrintWriter ( sw ) , 20 , "usage:<sp>app" 0 , null , option... | org . junit . Assert . assertEquals ( expected , sw . toString ( ) ) |
shouldStoreCurrentRecordsConcurrentConnectionsSslToNewMergedRecord ( ) { previousRecord . setConcurrentConnectionsSsl ( 10 ) ; currentRecord . setConcurrentConnectionsSsl ( 15 ) ; usagePollerHelper . calculateUsage ( currentRecord , previousRecord , newMergedRecord ) ; "<AssertPlaceHolder>" ; } getConcurrentConnections... | org . junit . Assert . assertEquals ( 15 , newMergedRecord . getConcurrentConnectionsSsl ( ) ) |
testPartitionForOnePartNumWithBothValueNull ( ) { org . apache . tajo . catalog . Schema schema = org . apache . tajo . catalog . SchemaBuilder . builder ( ) . add ( "l_returnflag" , Type . TEXT ) . add ( "l_linestatus" , Type . TEXT ) . build ( ) ; org . apache . tajo . catalog . SortSpec [ ] sortSpecs = org . apache ... | org . junit . Assert . assertEquals ( expected , ranges [ 0 ] ) |
testCosAcos ( ) { double [ ] epsilon = new double [ ] { 6.0E-16 , 6.0E-15 , 2.0E-13 , 4.0E-12 , 2.0E-10 } ; for ( int maxOrder = 0 ; maxOrder < 5 ; ++ maxOrder ) { for ( double x = 0.1 ; x < 1.2 ; x += 0.001 ) { org . apache . commons . math4 . analysis . differentiation . DerivativeStructure dsX = new org . apache . c... | org . junit . Assert . assertEquals ( 0.0 , zero . getPartialDerivative ( n ) , epsilon [ n ] ) |
testDNonExpressionNoVaultReader ( ) { org . jboss . as . server . RuntimeExpressionResolver testee = new org . jboss . as . server . RuntimeExpressionResolver ( null ) ; org . jboss . dmr . ModelNode value = new org . jboss . dmr . ModelNode ( org . jboss . as . server . RuntimeExpressionResolverUnitTestCase . NON_EXPR... | org . junit . Assert . assertEquals ( value , testee . resolveExpressions ( value ) ) |
testAlsDateTimeVolledigBekendeDatum ( ) { final nl . bzk . brp . domain . expressie . DatumLiteral datumLiteral = new nl . bzk . brp . domain . expressie . DatumLiteral ( 20171231 ) ; final java . time . ZonedDateTime zdt = java . time . ZonedDateTime . of ( 2017 , 12 , 31 , 0 , 0 , 0 , 0 , DatumUtil . NL_ZONE_ID ) ; "... | org . junit . Assert . assertEquals ( zdt , datumLiteral . alsDateTime ( ) ) |
checkMessageMethod ( ) { java . lang . String str = "test" ; info . smart_tools . smartactors . message_bus . interfaces . imessage_bus_container . exception . SendingMessageException exception = new info . smart_tools . smartactors . message_bus . interfaces . imessage_bus_container . exception . SendingMessageExcepti... | org . junit . Assert . assertEquals ( exception . getMessage ( ) , str ) |
getMyCustomerAsBroker ( ) { setupContainer ( ) ; mockTriggerQueue ( ) ; mockNoInvoiceAsDefault ( ) ; final org . oscm . domobjects . PlatformUser user = givenBroker ( ) ; container . login ( user . getKey ( ) , UserRoleType . BROKER_MANAGER . name ( ) ) ; org . oscm . domobjects . Marketplace marketplace = givenMarketp... | org . junit . Assert . assertEquals ( "customerName" , customer . getName ( ) ) |
testGetWithNoValue ( ) { java . util . Set < com . github . pmerienne . trident . state . testing . TestValue > actualSet = this . state . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { try { return template . getAll ( id , serializer ) ; } catch ( java . lang . Exception ex ) { throw new java . lang . RuntimeException ... | org . junit . Assert . assertTrue ( actualSet . isEmpty ( ) ) |
testValidString ( ) { final java . lang . String node = "node" ; final java . lang . String result = org . xmpp . packet . JID . nodeprep ( node ) ; "<AssertPlaceHolder>" ; } nodeprep ( java . lang . String ) { if ( node == null ) { return null ; } final org . xmpp . util . ValueWrapper < java . lang . String > cachedR... | org . junit . Assert . assertEquals ( node , result ) |
testExecutionOrder ( ) { org . eclipse . swt . widgets . Display display = new org . eclipse . swt . widgets . Display ( ) ; org . eclipse . rap . rwt . internal . lifecycle . PreserveWidgets_Test . LoggingWidgetLCA loggingWidgetLCA = new org . eclipse . rap . rwt . internal . lifecycle . PreserveWidgets_Test . Logging... | org . junit . Assert . assertEquals ( expectedorder , loggingWidgetLCA . log . toString ( ) ) |
classOfTimerYieldsBluefloodTimerRollup ( ) { "<AssertPlaceHolder>" ; } classOf ( com . rackspacecloud . blueflood . types . RollupType , com . rackspacecloud . blueflood . rollup . Granularity ) { if ( type == ( com . rackspacecloud . blueflood . types . RollupType . COUNTER ) ) return com . rackspacecloud . blueflood ... | org . junit . Assert . assertEquals ( com . rackspacecloud . blueflood . types . BluefloodTimerRollup . class , com . rackspacecloud . blueflood . types . RollupType . classOf ( RollupType . TIMER , null ) ) |
matchDateOnlyTestOpenEndedIntervalRangeBefore ( ) { org . dcm4che3 . data . Attributes testAttrs = new org . dcm4che3 . data . Attributes ( ) ; java . lang . String daString = "20151006-" ; java . util . List < org . dcm4chee . archive . entity . Study > studies = createDateRangeQuery ( testAttrs , daString ) ; "<Asser... | org . junit . Assert . assertThat ( studies . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
converter ( ) { com . querydsl . mongodb . Country germany = new com . querydsl . mongodb . Country ( "Germany" , Locale . GERMANY ) ; ds . save ( germany ) ; com . querydsl . mongodb . Country fetchedCountry = query ( com . querydsl . mongodb . Country . class ) . where ( country . defaultLocale . eq ( Locale . GERMAN... | org . junit . Assert . assertEquals ( germany , fetchedCountry ) |
spr11494 ( ) { org . springframework . expression . Expression exp = new org . springframework . expression . spel . standard . SpelExpressionParser ( ) . parseExpression ( "T(java.util.Arrays).asList('a','b')" ) ; java . util . List < java . lang . String > list = ( ( java . util . List < java . lang . String > ) ( ex... | org . junit . Assert . assertThat ( list . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) ) |
testExternalFileWithSecureLink ( ) { java . lang . String $ref = "https://foo.bar#/examples/address-example.json" ; validator . validate ( vh , context , key , $ref ) ; "<AssertPlaceHolder>" ; } getEventsSize ( ) { return result . getEvents ( ) . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , vh . getEventsSize ( ) ) |
testGetInvalidateWorkPctPerIteration_NegativeValue ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; float blocksInvalidateWorkPct = org . apache . hadoop . hdfs . DFSUtil . getInvalidateWorkPctPerIteration ( conf ) ; "<AssertPlaceHolder>" ; conf . set ( DF... | org . junit . Assert . assertTrue ( ( blocksInvalidateWorkPct > 0 ) ) |
test_year ( ) { int actual = org . openl . util . DateTool . year ( inputDate ) ; "<AssertPlaceHolder>" ; } year ( java . util . Date ) { if ( d == null ) { return null ; } return org . openl . util . DateTool . getYear ( d ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testCompareWithTag ( ) { org . codehaus . gmavenplus . model . Version v1 = org . codehaus . gmavenplus . model . Version . parseFromString ( "1.0.0" ) ; org . codehaus . gmavenplus . model . Version v2 = org . codehaus . gmavenplus . model . Version . parseFromString ( "1.0.0-beta-1" ) ; "<AssertPlaceHolder>" ; } comp... | org . junit . Assert . assertTrue ( ( ( v1 . compareTo ( v2 ) ) > 0 ) ) |
testGetDescription ( ) { final java . lang . String description = client . getDescription ( ) ; "<AssertPlaceHolder>" ; } getDescription ( ) { return description ; } | org . junit . Assert . assertEquals ( this . description , description ) |
test1 ( ) { nopol_examples . nopol_example_7 . NopolExample ex = new nopol_examples . nopol_example_7 . NopolExample ( ) ; "<AssertPlaceHolder>" ; } isPrime ( int ) { if ( a < 0 ) { return false ; } int intermediaire = a % 2 ; if ( intermediaire == 0 ) return false ; int sqrtMiddle = ( ( int ) ( ( java . lang . Math . ... | org . junit . Assert . assertTrue ( ex . isPrime ( 2 ) ) |
shouldReturnAnURI ( ) { org . aeonbits . owner . ConfigURIFactory h = new org . aeonbits . owner . ConfigURIFactory ( this . getClass ( ) . getClassLoader ( ) , new org . aeonbits . owner . VariablesExpander ( new java . util . Properties ( ) ) ) ; java . net . URI uri = h . newURI ( "classpath:test.properties" ) ; "<A... | org . junit . Assert . assertNotNull ( uri ) |
canHarvestIsFalseWhenNotHarvester ( ) { com . fundynamic . d2tm . game . map . MapEditor mapEditor = new com . fundynamic . d2tm . game . map . MapEditor ( new com . fundynamic . d2tm . game . terrain . impl . DuneTerrainFactory ( mock ( com . fundynamic . d2tm . graphics . Theme . class ) ) ) ; mapEditor . fillMapWith... | org . junit . Assert . assertThat ( unit . canHarvest ( ) , org . hamcrest . core . Is . is ( false ) ) |
testGetLast ( ) { org . openscience . cdk . interfaces . IAtom atom = new org . openscience . cdk . Atom ( org . openscience . cdk . config . Elements . CARBON ) ; org . openscience . cdk . smiles . InvPair pair = new org . openscience . cdk . smiles . InvPair ( 5L , atom ) ; "<AssertPlaceHolder>" ; } getLast ( ) { ret... | org . junit . Assert . assertEquals ( 0L , pair . getLast ( ) ) |
testCallWithNewTypedWriteOnlyTransactionAndSubmitPutSuccessfully ( ) { org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . mdsal . test . binding . rev140701 . two . level . list . TopLevelList data = newTestDataObject ( ) ; managedNewTransactionRunner . callWithNewWriteOnlyTransactio... | org . junit . Assert . assertEquals ( data , syncRead ( LogicalDatastoreType . OPERATIONAL , org . opendaylight . mdsal . binding . util . ManagedNewTransactionRunnerImplTest . TEST_PATH ) ) |
testBuild ( ) { org . lnu . is . domain . address . type . AddressType context = new org . lnu . is . domain . address . type . AddressType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>AddressType<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
whenAddingProfile_itShouldBeCorrect ( ) { com . graphhopper . jsprit . core . problem . vehicle . VehicleTypeImpl type = VehicleTypeImpl . Builder . newInstance ( "type" ) . setProfile ( "car" ) . build ( ) ; "<AssertPlaceHolder>" ; } getProfile ( ) { return profile ; } | org . junit . Assert . assertEquals ( "car" , type . getProfile ( ) ) |
testQueryListAccessAll ( ) { authRule . createGrantAuthorization ( Resources . BATCH , "*" , "user" , Permissions . READ ) ; authRule . enableAuthorization ( "user" ) ; java . util . List < org . camunda . bpm . engine . batch . BatchStatistics > batches = engineRule . getManagementService ( ) . createBatchStatisticsQu... | org . junit . Assert . assertEquals ( 2 , batches . size ( ) ) |
testRemoveOrderLineGroupWithAdvanceAssignments ( ) { org . libreplan . business . orders . entities . Order order = createValidOrder ( ) ; org . libreplan . business . scenarios . entities . OrderVersion orderVersion = order . getOrderVersionFor ( scenarioManager . getCurrent ( ) ) ; org . libreplan . business . orders... | org . junit . Assert . assertNotNull ( found ) |
testOnTimerHelloWord ( ) { final java . lang . String timerId = "my-timer-id" ; class SimpleTimerDoFn extends org . apache . beam . sdk . transforms . DoFn < java . lang . String , java . lang . String > { public java . lang . String status = "not<sp>yet" ; @ org . apache . beam . sdk . transforms . reflect . TimerId (... | org . junit . Assert . assertThat ( fn . status , org . hamcrest . Matchers . equalTo ( "OK<sp>now" ) ) |
testDeepCopyCount ( ) { java . util . TreeMap < org . apache . accumulo . core . data . Key , org . apache . accumulo . core . data . Value > tm = new java . util . TreeMap ( ) ; tm . put ( new org . apache . accumulo . core . data . Key ( "r1" , "cf1" , "cq1" ) , new org . apache . accumulo . core . data . Value ( "da... | org . junit . Assert . assertEquals ( 6 , ci . getCount ( ) ) |
respondsFalseWhenCheckingNullPatientLock ( ) { org . phenotips . recordLocking . script . RecordLockingService lockingService = this . mocker . getComponentUnderTest ( ) ; "<AssertPlaceHolder>" ; } isLocked ( org . phenotips . data . Patient ) { if ( patient == null ) { return false ; } return this . lockManager . isLo... | org . junit . Assert . assertFalse ( lockingService . isLocked ( ( ( org . phenotips . data . Patient ) ( null ) ) ) ) |
testSelectBestPoolsShouldNOTSelectPoolWithMatchingUsageWhenItCoversNoProducts ( ) { org . candlepin . model . Product product69 = new org . candlepin . model . Product ( ) ; product69 . setId ( "compliant-69" ) ; org . candlepin . model . ConsumerInstalledProduct consumerInstalledProduct = new org . candlepin . model .... | org . junit . Assert . assertEquals ( 0 , bestPools . size ( ) ) |
testReplaceLocalHostWithPort ( ) { org . apache . cxf . message . Message m = new org . apache . cxf . message . MessageImpl ( ) ; java . net . URI u = org . apache . cxf . jaxrs . utils . HttpUtils . toAbsoluteUri ( java . net . URI . create ( "http://localhost:8080/bar/foo" ) , m ) ; "<AssertPlaceHolder>" ; } toStrin... | org . junit . Assert . assertEquals ( "http://localhost:8080/bar/foo" , u . toString ( ) ) |
testRead ( ) { java . util . Set < java . lang . String > fields = com . yahoo . ycsb . db . solr . SolrClientBaseTest . MOCK_DATA . keySet ( ) ; java . util . HashMap < java . lang . String , com . yahoo . ycsb . ByteIterator > resultParam = new java . util . HashMap ( com . yahoo . ycsb . db . solr . SolrClientBaseTe... | org . junit . Assert . assertEquals ( Status . OK , result ) |
resolve_by_range_neg_b_neg_e ( ) { final com . groupon . lex . metrics . transformers . IdentifierNameResolver resolver = new com . groupon . lex . metrics . transformers . IdentifierNameResolver ( com . groupon . lex . metrics . transformers . IdentifierNameResolverTest . IDENTIFIER , java . util . Optional . of ( new... | org . junit . Assert . assertEquals ( com . groupon . lex . metrics . SimpleGroupPath . valueOf ( "foo" ) , resolver . apply ( ctx ) . map ( ( p ) -> com . groupon . lex . metrics . SimpleGroupPath . valueOf ( p . getPath ( ) ) ) . get ( ) ) |
testPutEntriesByPathExceedingExpectedSizeSetsFullyLoaded ( ) { org . apache . jackrabbit . oak . security . authorization . permission . PrincipalPermissionEntries ppe = new org . apache . jackrabbit . oak . security . authorization . permission . PrincipalPermissionEntries ( 1 ) ; java . util . Collection < org . apac... | org . junit . Assert . assertTrue ( ppe . isFullyLoaded ( ) ) |
testConsoleFuncArg ( ) { com . cloudera . flume . core . EventSink snk = com . cloudera . flume . conf . FlumeBuilder . buildSink ( com . cloudera . flume . conf . LogicalNodeContext . testingContext ( ) , "console(seqfile(\"BZip2Codec\"))" ) ; "<AssertPlaceHolder>" ; } testingContext ( ) { java . lang . String n = com... | org . junit . Assert . assertNotNull ( snk ) |
testMapWithGroupKeyAndRequiredListValue ( ) { java . util . List < org . apache . parquet . schema . Type > typeList = new java . util . ArrayList < org . apache . parquet . schema . Type > ( ) ; typeList . add ( new org . apache . parquet . schema . GroupType ( REQUIRED , "key" , new org . apache . parquet . schema . ... | org . junit . Assert . assertEquals ( expected , actual ) |
create_right_after_entity_creation_should_not_throw_exception ( ) { @ com . artemis . annotations . Wire ( injectInherited = true ) class TestSystem extends net . mostlyoriginal . api . plugin . extendedcomponentmapper . ExtendedComponentMapperPluginTest . BasicSystem { @ net . mostlyoriginal . api . plugin . extendedc... | org . junit . Assert . assertNotNull ( c1 ) |
testDoubleReverseEquality ( ) { org . locationtech . jts . geom . Geometry oldGeom = new org . locationtech . jts . io . WKTReader ( ) . read ( "MULTILINESTRING<sp>((40<sp>40,<sp>20<sp>45,<sp>45<sp>30,<sp>40<sp>40),(20<sp>35,<sp>45<sp>10,<sp>30<sp>5,<sp>10<sp>30,<sp>20<sp>35))" ) ; org . locationtech . jts . geom . Geo... | org . junit . Assert . assertEquals ( diff , diff2 ) |
validationWithOptionalShouldBeAppliedInCorrectOrderPass ( ) { when ( context . getParameter ( "param1" ) ) . thenReturn ( "20" ) ; create ( "requiredIntWithOptional" ) . invoke ( mockController , context ) ; verify ( mockController ) . requiredIntWithOptional ( java . util . Optional . of ( 20 ) ) ; "<AssertPlaceHolder... | org . junit . Assert . assertFalse ( validation . hasViolations ( ) ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . journal . model . JournalArticleResource missingJournalArticleResource = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return co... | org . junit . Assert . assertNull ( missingJournalArticleResource ) |
TestSha256Case2 ( ) { pkgYkneoOath . OathObj obj = new pkgYkneoOath . OathObj ( ) ; obj . setKey ( "Jefe" . getBytes ( ) , ( ( short ) ( 0 ) ) , ( ( byte ) ( ( pkgYkneoOath . OathObj . TOTP_TYPE ) | ( pkgYkneoOath . OathObj . HMAC_SHA256 ) ) ) , ( ( short ) ( 4 ) ) ) ; byte [ ] res = new byte [ 32 ] ; byte [ ] challeng... | org . junit . Assert . assertArrayEquals ( expected , res ) |
shouldReturnFeatureDisabledGivenSpringExpressionWithEnvironmentPropertyEvaluatesToFalse ( ) { java . lang . reflect . Method method = org . flips . fixture . TestClientFlipAnnotationsWithSpringExpressionAnnotations . class . getMethod ( "featureWithSpringExpressionBasedOnEnvironmentProperty" ) ; boolean result = flipAn... | org . junit . Assert . assertEquals ( false , result ) |
testAddDeleteUsers ( ) { java . lang . String roleName = "test-users" ; createRole ( roleName ) ; java . util . Set < java . lang . String > users = com . google . common . collect . Sets . newHashSet ( "test-user-u1" , "test-user-u2" ) ; org . apache . sentry . provider . db . service . persistent . TestSentryStore . ... | org . junit . Assert . assertEquals ( 0 , role . getUsers ( ) . size ( ) ) |
testIsNederlandCode ( ) { final nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3LandCode landCode = new nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3LandCode ( "6030" ) ; "<AssertPlaceHolder>" ; } isNederlandCode ( ) { return nl . moderniseringgba . migratie . conversie . model . lo3 ... | org . junit . Assert . assertTrue ( landCode . isNederlandCode ( ) ) |
testGetTableStatusOrCreateIfNotExistsProcessingNotExpired ( ) { status . setState ( TableState . PROCESSING ) ; when ( mockTableStatusDAO . getTableStatus ( tableId ) ) . thenReturn ( status ) ; when ( mockTableIndexDAO . doesIndexStateMatch ( anyString ( ) , anyLong ( ) , anyString ( ) ) ) . thenReturn ( true ) ; when... | org . junit . Assert . assertNotNull ( result ) |
givenDraconianSingleton_whenMultithreadInstancesEquals_thenTrue ( ) { java . util . concurrent . ExecutorService executor = java . util . concurrent . Executors . newFixedThreadPool ( com . baeldung . singleton . synchronization . SingletonSynchronizationIntegrationTest . POOL_SIZE ) ; java . util . Set < com . baeldun... | org . junit . Assert . assertEquals ( 1 , resultSet . size ( ) ) |
testAbstractVisualMappingFunction ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( function ) |
testFindByPrimaryKeyExisting ( ) { com . liferay . portal . workflow . kaleo . model . KaleoDefinitionVersion newKaleoDefinitionVersion = addKaleoDefinitionVersion ( ) ; com . liferay . portal . workflow . kaleo . model . KaleoDefinitionVersion existingKaleoDefinitionVersion = _persistence . findByPrimaryKey ( newKaleo... | org . junit . Assert . assertEquals ( existingKaleoDefinitionVersion , newKaleoDefinitionVersion ) |
testSendRecordsNoTimestamp ( ) { final java . lang . Long timestamp = - 1L ; createWorkerTask ( ) ; java . util . List < org . apache . kafka . connect . source . SourceRecord > records = java . util . Collections . singletonList ( new org . apache . kafka . connect . source . SourceRecord ( org . apache . kafka . conn... | org . junit . Assert . assertEquals ( null , sent . getValue ( ) . timestamp ( ) ) |
testStridedLog ( ) { org . nd4j . linalg . api . ops . executioner . OpExecutioner opExecutioner = org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) ; org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 6 , 6 ) . reshape ( 2 , 3 ) ; org . nd4j . linalg . ap... | org . junit . Assert . assertEquals ( getFailureMessage ( ) , assertion , slice ) |
test ( ) { java . util . List < com . vladmihalcea . book . hpjp . hibernate . query . hierarchical . PostComment > comments = doInJPA ( ( entityManager ) -> { return ( ( List < com . vladmihalcea . book . hpjp . hibernate . query . hierarchical . PostComment > ) ( entityManager . unwrap ( . class ) . createQuery ( ( "... | org . junit . Assert . assertEquals ( 2 , comments . size ( ) ) |
addRevokeUserUnitAssignment ( ) { org . oscm . vo . VOUserDetails uniqueUser = org . oscm . ws . IdentityServiceWSTest . createUniqueUser ( ) ; uniqueUser . setFirstName ( "User" ) ; org . oscm . ws . IdentityServiceWSTest . is . createUser ( uniqueUser , java . util . Arrays . asList ( UserRoleType . SERVICE_MANAGER )... | org . junit . Assert . assertTrue ( result ) |
testDecodeAll8bitCharacters ( ) { java . lang . String inStr = "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIj" + ( ( ( ( ( ( "JCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZH" + "SElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWpr" ) + "bG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6P" ) + "kJGSk5SVlpeYmZqbnJ2en6ChoqOk... | org . junit . Assert . assertArrayEquals ( expectedBytes , bytesOut ) |
testFormat ( ) { java . lang . String year = "2015" ; java . lang . String simpleFormat = "yyyy" ; java . lang . String language = "de" ; java . util . Locale locale = new java . util . Locale ( language ) ; org . mycore . datamodel . common . MCRISO8601Date mcrdate = new org . mycore . datamodel . common . MCRISO8601D... | org . junit . Assert . assertEquals ( year , formatted ) |
connection_should_be_unregistered_at_end ( ) { com . lordofthejars . nosqlunit . core . ConnectionManagement connectionManagement = com . lordofthejars . nosqlunit . core . ConnectionManagement . getInstance ( ) ; connectionManagement . addConnection ( "localhost" , 111 ) ; connectionManagement . removeConnection ( "lo... | org . junit . Assert . assertThat ( connectionManagement . isConnectionRegistered ( "localhost" , 111 ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testAxpySparseArray ( ) { org . apache . ignite . ml . math . primitives . vector . impl . DenseVector y = new org . apache . ignite . ml . math . primitives . vector . impl . DenseVector ( new double [ ] { 1.0 , 2.0 } ) ; double a = 2.0 ; org . apache . ignite . ml . math . primitives . vector . impl . SparseVector x ... | org . junit . Assert . assertTrue ( org . apache . ignite . ml . math . BlasTest . elementsEqual ( exp , y ) ) |
testSerializeRestrictedProject ( ) { org . jabylon . properties . Workspace workspace = PropertiesFactory . eINSTANCE . createWorkspace ( ) ; org . jabylon . properties . Project project1 = PropertiesFactory . eINSTANCE . createProject ( ) ; org . jabylon . properties . Project project2 = PropertiesFactory . eINSTANCE ... | org . junit . Assert . assertEquals ( expected , result . toString ( ) ) |
testMODIS1KM ( ) { org . esa . snap . core . datamodel . Product product = new org . esa . snap . core . datamodel . Product ( "dummy" , "dummy-modis1km" , 2 , 2 ) ; org . esa . snap . core . datamodel . MetadataElement root = product . getMetadataRoot ( ) ; org . esa . snap . core . datamodel . MetadataElement globalA... | org . junit . Assert . assertEquals ( Instrument . MODIS , org . esa . s3tbx . fu . DetectInstrument . getInstrument ( product ) ) |
reflectWrite ( ) { alluxio . master . file . meta . MutableInodeDirectory updated = alluxio . master . file . meta . MutableInodeDirectory . create ( alluxio . master . metastore . caching . CachingInodeStoreMockedBackingStoreTest . TEST_INODE_ID , 10 , "newName" , alluxio . master . file . contexts . CreateDirectoryCo... | org . junit . Assert . assertEquals ( "newName" , mStore . get ( alluxio . master . metastore . caching . CachingInodeStoreMockedBackingStoreTest . TEST_INODE_ID ) . get ( ) . getName ( ) ) |
testPrintOnePositiveInteger ( ) { final java . io . StringWriter sw = new java . io . StringWriter ( ) ; try ( final org . apache . commons . csv . CSVPrinter printer = new org . apache . commons . csv . CSVPrinter ( sw , CSVFormat . DEFAULT . withQuoteMode ( QuoteMode . MINIMAL ) ) ) { printer . print ( Integer . MAX_... | org . junit . Assert . assertEquals ( java . lang . String . valueOf ( Integer . MAX_VALUE ) , sw . toString ( ) ) |
testCountJobExecutions ( ) { "<AssertPlaceHolder>" ; } countJobExecutions ( ) { return jobExecutionDao . countJobExecutions ( ) ; } | org . junit . Assert . assertEquals ( 3 , dao . countJobExecutions ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.