input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
test ( ) { try { ejb . createCustomer ( "john" , "park<sp>avenue<sp>125" , "jsmith@gmail.com" , "+3955555" ) ; com . itbuzzpress . chapter8 . entity . Customer customer = ejb . findCustomerByName ( "john" ) ; java . util . List < com . itbuzzpress . chapter8 . entity . Customer > cc = ejb . findAllCustomers ( ) ; Syste... | org . junit . Assert . assertNotNull ( customer ) |
activateWithLightLanguage ( ) { final net . violet . platform . datamodel . User myUser = getActionTestUser ( ) ; final net . violet . platform . datamodel . VObject myObject = Factories . VOBJECT . findByOwner ( myUser ) . get ( 0 ) ; final net . violet . platform . datamodel . Music theMusic = creerMusique ( myUser )... | org . junit . Assert . assertEquals ( 1 , myForm . getIsReg ( ) ) |
testNumeicValues ( ) { for ( java . lang . String validValue : com . networknt . schema . TypeValidatorTest . validNumericValues ) { "<AssertPlaceHolder>" ; } } isNumeric ( java . lang . String ) { if ( ( str == null ) || ( str . equals ( "" ) ) ) { return false ; } int i = 0 ; int len = str . length ( ) ; if ( ( ( str... | org . junit . Assert . assertTrue ( validValue , com . networknt . schema . TypeValidator . isNumeric ( validValue ) ) |
should_return_this ( ) { org . fest . assertions . api . IntegerAssert returned = assertions . isNotLessThan ( expected ) ; "<AssertPlaceHolder>" ; } isNotLessThan ( byte ) { bytes . assertNotLessThan ( description , actual , expected ) ; return this ; } | org . junit . Assert . assertSame ( assertions , returned ) |
saveCategories ( ) { facesMessages = new java . util . ArrayList < javax . faces . application . FacesMessage > ( ) ; categoryBean . getCategoriesRows ( ) ; categoryBean . saveCategories ( ) ; "<AssertPlaceHolder>" ; java . util . List < org . oscm . internal . vo . VOCategory > toSave = new java . util . ArrayList < o... | org . junit . Assert . assertEquals ( 1 , facesMessages . size ( ) ) |
testSetsCategory ( ) { com . eclipsesource . tabris . tracking . OrderItem item = new com . eclipsesource . tabris . tracking . OrderItem ( "foo" ) ; item . setCategory ( "bar" ) ; java . lang . String category = item . getCategory ( ) ; "<AssertPlaceHolder>" ; } getCategory ( ) { return category ; } | org . junit . Assert . assertEquals ( category , "bar" ) |
testUncaughtExceptionInHeartbeatThread ( ) { setupCoordinator ( ) ; mockClient . prepareResponse ( groupCoordinatorResponse ( node , Errors . NONE ) ) ; mockClient . prepareResponse ( joinGroupFollowerResponse ( 1 , "memberId" , "leaderId" , Errors . NONE ) ) ; mockClient . prepareResponse ( syncGroupResponse ( Errors ... | org . junit . Assert . assertEquals ( exception , e ) |
testNonCycle3 ( ) { owltools . io . ParserWrapper parser = new owltools . io . ParserWrapper ( ) ; org . semanticweb . owlapi . model . IRI iri = org . semanticweb . owlapi . model . IRI . create ( getResource ( "verification/self_references.obo" ) . getAbsoluteFile ( ) ) ; owltools . graph . OWLGraphWrapper graph = pa... | org . junit . Assert . assertTrue ( warnings . isEmpty ( ) ) |
ensureDagIdIsUnique ( ) { final int threadCount = 5 ; final java . util . concurrent . CountDownLatch threadReadyToStartSignal = new java . util . concurrent . CountDownLatch ( threadCount ) ; final java . util . concurrent . CountDownLatch startThreadSignal = new java . util . concurrent . CountDownLatch ( 1 ) ; final... | org . junit . Assert . assertEquals ( ( threadCount * numberOfWorkToCreatePerThread ) , allWorkDagIds . size ( ) ) |
shouldBuildDropTableStatement ( ) { java . lang . String expected = "DROP<sp>TABLE<sp>\"myTable\"" ; java . lang . String sql = dialect . buildDropTableStatement ( tableId , new io . confluent . connect . jdbc . dialect . DropOptions ( ) . setIfExists ( false ) ) ; "<AssertPlaceHolder>" ; } setIfExists ( boolean ) { re... | org . junit . Assert . assertEquals ( expected , sql ) |
createUploadRequest ( ) { org . linagora . linshare . service . UploadRequestServiceImplTestV2 . logger . info ( LinShareTestConstants . BEGIN_TEST ) ; org . linagora . linshare . core . domain . entities . UploadRequest request = uploadRequest . clone ( ) ; org . linagora . linshare . core . domain . entities . Upload... | org . junit . Assert . assertNotNull ( uploadRequest ) |
shouldCreate ( ) { final com . github . jloisel . reactive . conversion . jackson . BeanWrapper < com . github . jloisel . reactive . entity . api . ReactiveEntity > beanWrapper = new com . github . jloisel . reactive . conversion . jackson . BeanWrapper < com . github . jloisel . reactive . entity . api . ReactiveEnti... | org . junit . Assert . assertNotNull ( beanWrapper ) |
testShouldCleanUpProcessorsOnDelete ( ) { java . util . concurrent . atomic . AtomicBoolean cleanUp = registerCleanUpDLProcessor ( ) ; com . liferay . portal . kernel . repository . model . FileEntry fileEntry = com . liferay . document . library . kernel . service . DLAppServiceUtil . addFileEntry ( _serviceContext . ... | org . junit . Assert . assertTrue ( cleanUp . get ( ) ) |
testApplyThenCompareNull ( ) { com . sun . mail . util . logging . SeverityComparator a = new com . sun . mail . util . logging . SeverityComparator ( ) ; "<AssertPlaceHolder>" ; } applyThenCompare ( java . lang . Throwable , java . lang . Throwable ) { return tc1 == tc2 ? 0 : compareThrowable ( apply ( tc1 ) , apply (... | org . junit . Assert . assertEquals ( 0 , a . applyThenCompare ( ( ( java . lang . Throwable ) ( null ) ) , ( ( java . lang . Throwable ) ( null ) ) ) ) |
whenWeRunThreeThreadsWeShouldBeGetCounterRight ( ) { ru . szhernovoy . counter . UseCounter useCounter = new ru . szhernovoy . counter . UseCounter ( ) ; java . lang . Thread th1 = new java . lang . Thread ( new ru . szhernovoy . counter . UseCounter . Count ( useCounter ) ) ; java . lang . Thread th2 = new java . lang... | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( 3 ) ) |
TestNeedValidate04 ( ) { java . lang . String tokenName = "aaa" ; org . terasoluna . gfw . web . token . transaction . TransactionTokenType beginToken = TransactionTokenType . END ; org . terasoluna . gfw . web . token . transaction . TransactionTokenInfo info = new org . terasoluna . gfw . web . token . transaction . ... | org . junit . Assert . assertThat ( output , org . hamcrest . CoreMatchers . is ( false ) ) |
shouldUseValueFromAnnotationType ( ) { final java . lang . String expected = "{\"mapping\":{\"properties\":{\"price\":{\"store\":false,\"type\":\"double\"}}}}" ; org . elasticsearch . common . xcontent . XContentBuilder xContentBuilder = org . springframework . data . elasticsearch . core . MappingBuilder . buildMappin... | org . junit . Assert . assertThat ( xContentBuilderToString ( xContentBuilder ) , org . hamcrest . CoreMatchers . is ( expected ) ) |
scaleContainCenterSameAspectRatioAndDifferentDimensions ( ) { com . fundynamic . d2tm . math . Rectangle rec = new com . fundynamic . d2tm . math . Rectangle ( 0 , 0 , 50 , 50 ) ; com . fundynamic . d2tm . math . Rectangle result = rec . scaleContainCenter ( new com . fundynamic . d2tm . math . Vector2D ( 100 , 100 ) )... | org . junit . Assert . assertEquals ( new com . fundynamic . d2tm . math . Rectangle ( 0 , 0 , 50 , 50 ) , result ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . portal . kernel . model . ServiceComponent newServiceComponent = addServiceComponent ( ) ; com . liferay . portal . kernel . model . ServiceComponent existingServiceComponent = _persistence . fetchByPrimaryKey ( newServiceComponent . getPrimaryKey ( ) ) ; "<AssertPlac... | org . junit . Assert . assertEquals ( existingServiceComponent , newServiceComponent ) |
testSetOffsetResetsBoundLimit ( ) { builder . setLimit ( org . mockito . Mockito . mock ( javax . jcr . Value . class ) , ( - 1 ) ) ; builder . setLimit ( 25 , ( - 1 ) ) ; "<AssertPlaceHolder>" ; } getBound ( ) { return bound ; } | org . junit . Assert . assertNull ( builder . getBound ( ) ) |
shouldAcceptGoodHostPost ( ) { res = hv . validate ( host , org . openstack . atlas . api . mgmt . validation . validators . POST ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . results . ValidatorResult , java . lang . Enum ) { java . lang . StringBuilder sb = new java . lang... | org . junit . Assert . assertTrue ( resultMessage ( res , org . openstack . atlas . api . mgmt . validation . validators . POST ) , res . passedValidation ( ) ) |
testInsertChunkHeaderSuccessfull6 ( ) { ichunk . setGroup ( null ) ; ichunk . setRule ( null ) ; ichunk . setTags ( null ) ; org . goodoldai . jeff . report . rtf . RTFChunkUtility . insertChunkHeader ( ichunk , doc ) ; java . util . ArrayList < java . lang . Object [ ] > events = docListener . getCapturedEvents ( ) ; ... | org . junit . Assert . assertTrue ( ( ( events . size ( ) ) == 1 ) ) |
testGetTheMedian ( ) { java . lang . String [ ] args = new java . lang . String [ 2 ] ; args [ 0 ] = org . apache . hadoop . examples . TestWordStats . INPUT ; args [ 1 ] = org . apache . hadoop . examples . TestWordStats . MEDIAN_OUTPUT ; org . apache . hadoop . examples . WordMedian wm = new org . apache . hadoop . e... | org . junit . Assert . assertEquals ( median , wr . read ( org . apache . hadoop . examples . TestWordStats . INPUT ) , 0.0 ) |
taskStatusNotAffectedByEndEndDeps ( ) { org . libreplan . business . planner . entities . Dependency dependency = mockDependency ( Type . END_END ) ; dependency . getOrigin ( ) . setAdvancePercentage ( BigDecimal . ZERO ) ; "<AssertPlaceHolder>" ; } getTaskStatus ( ) { if ( this . isFinished ( ) ) { return TaskStatusEn... | org . junit . Assert . assertTrue ( ( ( task . getTaskStatus ( ) ) == ( org . libreplan . business . planner . entities . TaskStatusEnum . READY_TO_START ) ) ) |
returns_job_is_done ( ) { org . apache . metron . job . JobStatus expected = new org . apache . metron . job . JobStatus ( ) . withState ( State . SUCCEEDED ) . withJobId ( jobId1 ) ; when ( job1 . getStatus ( ) ) . thenReturn ( expected ) ; when ( job1 . isDone ( ) ) . thenReturn ( true ) ; jm . submit ( newSupplier (... | org . junit . Assert . assertThat ( done , org . hamcrest . CoreMatchers . equalTo ( true ) ) |
testStatusWithoutSummary ( ) { java . util . Collection < org . springframework . cloud . dataflow . rest . resource . AppStatusResource > data = new java . util . ArrayList ( ) ; data . add ( appStatusResource1 ) ; data . add ( appStatusResource2 ) ; org . springframework . hateoas . PagedResources . PageMetadata meta... | org . junit . Assert . assertThat ( java . lang . String . valueOf ( model . getValue ( ( row + 1 ) , col ) ) , org . hamcrest . Matchers . is ( expected [ row ] [ col ] ) ) |
testReplace ( ) { java . lang . String strFormat = "YYYYMMdd" ; org . joda . time . format . DateTimeFormatter format = com . huffingtonpost . chronos . agent . QueryReplaceUtil . makeDateTimeFormat ( strFormat ) ; java . lang . String query = java . lang . String . format ( "SELECT<sp>*<sp>FROM<sp>ATable<sp>where<sp>t... | org . junit . Assert . assertEquals ( expected , actual ) |
testPipelineRecoveryOnOOB ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; conf . set ( HdfsClientConfigKeys . DFS_CLIENT_DATANODE_RESTART_TIMEOUT_KEY , "15" ) ; org . apache . hadoop . hdfs . MiniDFSCluster cluster = null ; try { int numDataNodes = 1 ... | org . junit . Assert . assertEquals ( 0 , dfsadmin . run ( args1 ) ) |
testGetRemitToReturnsValidData ( ) { org . oscarehr . common . dao . BillingONCHeader1Dao cHeader1Dao = ( ( org . oscarehr . common . dao . BillingONCHeader1Dao ) ( org . oscarehr . util . SpringUtils . getBean ( org . oscarehr . common . dao . BillingONCHeader1Dao . class ) ) ) ; org . oscarehr . common . model . Bill... | org . junit . Assert . assertEquals ( extraBillingPayment , billingRecord ) |
processDisabled ( ) { aptOptions = java . util . Arrays . asList ( "-Aquerydsl.logInfo=false" ) ; process ( ) ; "<AssertPlaceHolder>" ; } isStdErrEmpty ( ) { return ( getStdErr ( ) . toByteArray ( ) . length ) == 0 ; } | org . junit . Assert . assertTrue ( isStdErrEmpty ( ) ) |
testListIsNull ( ) { final java . lang . String [ ] names = new java . lang . String [ ] { "a" , "b" } ; final java . util . List < ucar . nc2 . Variable > variables = null ; final ucar . nc2 . Variable [ ] result = org . esa . beam . dataio . netcdf . util . ReaderUtils . getVariables ( variables , names ) ; "<AssertP... | org . junit . Assert . assertNull ( result ) |
testSeriazableWithRemovals ( ) { final java . lang . String name = "testScalableList" ; final int total = 5 ; com . sun . sgs . test . app . util . TestScalableList . txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) throws com . sun . sgs . test . app . u... | org . junit . Assert . assertEquals ( total , count ) |
shouldFailWithInvalidCloneType ( ) { when ( settings . getString ( Notifier . CLONE_TYPE ) ) . thenReturn ( "invalid" ) ; com . nerdwin15 . stash . webhook . NotificationResult res = notifier . notify ( repo , "refs/heads/master" , "sha1" , "refs/heads/master" ) ; "<AssertPlaceHolder>" ; } isSuccessful ( ) { return suc... | org . junit . Assert . assertFalse ( res . isSuccessful ( ) ) |
shouldFailIfAnEditedOrderIsFlushed ( ) { org . openmrs . Encounter encounter = encounterService . getEncounter ( 3 ) ; "<AssertPlaceHolder>" ; encounter . getOrders ( ) . iterator ( ) . next ( ) . setInstructions ( "new" ) ; expectedException . expect ( org . openmrs . api . APIException . class ) ; expectedException .... | org . junit . Assert . assertFalse ( encounter . getOrders ( ) . isEmpty ( ) ) |
testSetNonCalculatedEmissionsForPopulation_nullEmissions ( ) { setUpForNonCaculatedEmissions ( ) ; org . matsim . api . core . v01 . Id < org . matsim . api . core . v01 . population . Person > idp5 = org . matsim . api . core . v01 . Id . create ( "p5" , org . matsim . api . core . v01 . population . Person . class ) ... | org . junit . Assert . assertTrue ( nullPointerEx ) |
testForUnSignedLongArray ( ) { java . lang . Long [ ] longArr = new java . lang . Long [ 2 ] ; longArr [ 0 ] = 1L ; longArr [ 1 ] = 2L ; org . apache . phoenix . schema . types . PhoenixArray arr = org . apache . phoenix . schema . types . PArrayDataType . instantiatePhoenixArray ( PUnsignedLong . INSTANCE , longArr ) ... | org . junit . Assert . assertEquals ( arr , resultArr ) |
includeModulesFromMultipleLayers ( ) { org . jboss . as . cli . completion . modules . test . ModuleNameTabCompleterTestCase . createLayerModules ( "base" , "layer1" ) ; org . jboss . as . cli . completion . modules . test . ModuleNameTabCompleterTestCase . createLayerModules ( "another" , "layer2" ) ; "<AssertPlaceHol... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "layer1" , "layer2" ) , complete ( null ) ) |
testFlushDB ( ) { doCmdTest ( new org . cyy . fw . nedis . test . cmd . TestAction ( ) { @ org . cyy . fw . nedis . test . cmd . Override public void doTest ( ) throws org . cyy . fw . nedis . test . cmd . InterruptedException , org . cyy . fw . nedis . util . NedisException { org . cyy . fw . nedis . ResponseCallback ... | org . junit . Assert . assertEquals ( "OK" , result ) |
testBinarySearch ( ) { System . out . println ( "binarySearch" ) ; int [ ] index = new int [ ] { 10 , 11 , 12 , 13 , 14 } ; int key = 12 ; int begin = 0 ; int end = 5 ; int expResult = 2 ; int result = org . genemania . engine . matricks . Utils . binarySearch ( index , key , begin , end ) ; "<AssertPlaceHolder>" ; } b... | org . junit . Assert . assertEquals ( expResult , result ) |
getGrowthRate ( ) { org . javamoney . calc . common . FutureValueGrowingAnnuity val = org . javamoney . calc . common . FutureValueGrowingAnnuity . of ( org . javamoney . calc . common . Rate . of ( 0.01 ) , org . javamoney . calc . common . Rate . of ( 0.03 ) , 1 ) ; "<AssertPlaceHolder>" ; } getGrowthRate ( ) { retur... | org . junit . Assert . assertEquals ( val . getGrowthRate ( ) , org . javamoney . calc . common . Rate . of ( 0.03 ) ) |
testHDFSBlob ( ) { expect ( mockConnection . getBlobStore ( ) ) . andReturn ( mockStore ) . times ( 3 ) ; expect ( mockStore . getId ( ) ) . andReturn ( de . fiz . akubra . hdfs . HDFSBlobTest . blobStoreUri ) . times ( 2 ) ; replay ( mockConnection , mockFs , mockStore ) ; de . fiz . akubra . hdfs . HDFSBlob b = new d... | org . junit . Assert . assertNotNull ( b ) |
testGetPath ( ) { org . apache . storm . hdfs . bolt . format . FileNameFormat delegate = new org . apache . storm . hdfs . bolt . format . DefaultFileNameFormat ( ) . withExtension ( org . apache . metron . writer . hdfs . PathExtensionFileNameFormatTest . EXTENSION ) . withPath ( org . apache . metron . writer . hdfs... | org . junit . Assert . assertEquals ( expected , actual ) |
testIterableInterface ( ) { int count = 0 ; for ( com . zklogtool . data . Transaction t : transactionLogFile ) { count ++ ; } "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 15 , count ) |
testTextFieldValueRendererWithoutRepeatableValues ( ) { com . liferay . dynamic . data . mapping . storage . DDMFormFieldValue ddmFormFieldValue = createDDMFormFieldValue ( "Text" , new com . liferay . dynamic . data . mapping . model . UnlocalizedValue ( "Scott<sp>Joplin" ) ) ; com . liferay . dynamic . data . mapping... | org . junit . Assert . assertEquals ( "Scott<sp>Joplin" , renderedValue ) |
testArgMin ( ) { org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; for ( lombok . val dim : new int [ ] [ ] { new int [ ] { 0 } , new int [ ] { 1 } , new int [ ] { Integer . MAX_VALUE } , new int [ ] { 0 , 1 } , new int [ ] { } } ) { org . nd4j . linalg . api . ndarray . INDArray inArr = org . ... | org . junit . Assert . assertEquals ( exp , out ) |
handleMessageNoStsClient ( ) { org . talend . esb . security . saml . STSRESTOutInterceptor i = new org . talend . esb . security . saml . STSRESTOutInterceptor ( ) ; org . apache . cxf . message . Message message = createMock ( org . apache . cxf . message . Message . class ) ; message . get ( Message . REQUESTOR_ROLE... | org . junit . Assert . assertSame ( null , i . getStsClient ( ) ) |
captureBlob_shouldFind ( ) { byte [ ] expected = someBytes ( ) ; com . beijunyi . parallelgit . utils . io . BlobSnapshot snapshot = com . beijunyi . parallelgit . utils . io . BlobSnapshot . capture ( expected ) ; "<AssertPlaceHolder>" ; } getData ( ) { if ( ( data ) != null ) return data ; if ( ( id ) == null ) throw... | org . junit . Assert . assertArrayEquals ( expected , snapshot . getData ( ) ) |
testDelRepo ( ) { int reposCnt = org . apache . zeppelin . dep . DependencyResolverTest . resolver . getRepos ( ) . size ( ) ; org . apache . zeppelin . dep . DependencyResolverTest . resolver . delRepo ( "securecentral" ) ; org . apache . zeppelin . dep . DependencyResolverTest . resolver . delRepo ( "badId" ) ; "<Ass... | org . junit . Assert . assertEquals ( ( reposCnt - 1 ) , org . apache . zeppelin . dep . DependencyResolverTest . resolver . getRepos ( ) . size ( ) ) |
testActualiza ( ) { log . debug ( "Debiera<sp>modificar<sp>una<sp>Orden<sp>de<sp>Pago<sp>nueva" ) ; mx . edu . um . mateo . contabilidad . web . Usuario usuario = this . obtieneUsuario ( ) ; this . authenticate ( usuario , usuario . getPassword ( ) , new java . util . ArrayList < org . springframework . security . core... | org . junit . Assert . assertNotNull ( orden . getId ( ) ) |
testFindByPrimaryKeyExisting ( ) { com . liferay . portal . kernel . model . Website newWebsite = addWebsite ( ) ; com . liferay . portal . kernel . model . Website existingWebsite = _persistence . findByPrimaryKey ( newWebsite . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId... | org . junit . Assert . assertEquals ( existingWebsite , newWebsite ) |
testSerialization ( ) { java . awt . Stroke s = new java . awt . BasicStroke ( 1.23F ) ; org . jfree . chart . title . LegendGraphic g1 = new org . jfree . chart . title . LegendGraphic ( new java . awt . geom . Rectangle2D . Double ( 1.0 , 2.0 , 3.0 , 4.0 ) , java . awt . Color . black ) ; g1 . setOutlineStroke ( s ) ... | org . junit . Assert . assertTrue ( g1 . equals ( g2 ) ) |
firstProviderInChainGivesRegionInformation_DoesNotConsultOtherProviders ( ) { software . amazon . awssdk . regions . providers . AwsRegionProvider providerOne = mock ( software . amazon . awssdk . regions . providers . AwsRegionProvider . class ) ; software . amazon . awssdk . regions . providers . AwsRegionProvider pr... | org . junit . Assert . assertEquals ( expectedRegion , chain . getRegion ( ) ) |
testFrontendUrlWithSingleUrl ( ) { java . util . Map < java . net . URI , java . net . URI > emptyMap = new java . util . HashMap ( ) ; when ( graphiteSources . getIpportsByUrl ( ) ) . thenReturn ( new java . util . HashMap ( ) ) ; when ( this . graphiteSources . getSources ( ) ) . thenReturn ( java . util . stream . S... | org . junit . Assert . assertEquals ( com . vsct . supervision . notification . model . AlarmMapperTest . DEFAULT_GRAPHITE_URL , backendAlarm . getGraphiteBaseUrl ( ) ) |
testNoUnConvertGt ( ) { java . lang . String testString = ">" ; "<AssertPlaceHolder>" ; } unescapeToXML ( java . lang . String ) { if ( com . github . bordertech . wcomponents . util . Util . empty ( input ) ) { return input ; } java . lang . String encoded = com . github . bordertech . wcomponents . WebUtilities . dou... | org . junit . Assert . assertEquals ( testString , com . github . bordertech . wcomponents . util . HtmlToXMLUtil . unescapeToXML ( testString ) ) |
testRelease_doesNotRemoveExistingActiveKeys ( ) { setActiveKeys ( "CTRL+S" , "CTRL+T" ) ; acceleratorSupport . setAccelerator ( ( ( org . eclipse . swt . SWT . CTRL ) | 'T' ) ) ; acceleratorSupport . release ( ) ; "<AssertPlaceHolder>" ; } getActiveKeys ( ) { return org . eclipse . swt . widgets . AcceleratorBinding_Te... | org . junit . Assert . assertTrue ( getActiveKeys ( ) . contains ( "CTRL+T" ) ) |
testNotPredicate ( ) { long ts = java . lang . System . currentTimeMillis ( ) ; com . srotya . sidewinder . core . predicates . Predicate predicate = new com . srotya . sidewinder . core . predicates . NotPredicate ( java . util . Arrays . asList ( new com . srotya . sidewinder . core . predicates . EqualsPredicate ( t... | org . junit . Assert . assertTrue ( ( ! ( predicate . test ( ts ) ) ) ) |
testTimerServiceNonPersistent ( ) { "<AssertPlaceHolder>" ; } quickAwaitTimerCall ( ) { try { org . jboss . as . test . integration . ejb . timerservice . persistence . NonPersistentTimerServiceBean . latch . await ( org . jboss . as . test . integration . ejb . timerservice . persistence . NonPersistentTimerServiceBea... | org . junit . Assert . assertFalse ( org . jboss . as . test . integration . ejb . timerservice . persistence . NonPersistentTimerServiceBean . quickAwaitTimerCall ( ) ) |
testBasicRoleWithKeyContainingQuotes ( ) { org . apache . activemq . artemis . core . server . management . JMXAccessControlList controlList = new org . apache . activemq . artemis . core . server . management . JMXAccessControlList ( ) ; controlList . addToRoleAccess ( "org.myDomain" , "type=foo" , "listSomething" , "... | org . junit . Assert . assertArrayEquals ( roles . toArray ( ) , new java . lang . String [ ] { "admin" } ) |
testEndToEnd ( ) { final java . lang . String expected = org . dswarm . persistence . util . DMPPersistenceUtil . getResourceAsString ( "test_csv.csv" ) ; final org . dswarm . converter . flow . CSVSourceResourceCSVPreviewFlow flow = injector . getInstance ( org . dswarm . converter . flow . CSVResourceFlowFactory . cl... | org . junit . Assert . assertEquals ( expected , actual ) |
asyncModifySubscription ( ) { when ( service . asyncModifySubscription ( anyString ( ) , anyString ( ) , anyString ( ) , anyListOf ( org . oscm . provisioning . data . ServiceParameter . class ) , anyListOf ( org . oscm . provisioning . data . ServiceAttribute . class ) , any ( org . oscm . provisioning . data . User .... | org . junit . Assert . assertEquals ( org . oscm . applicationservice . provisioning . adapter . v1_0 . ProvisioningServiceAdapterV1_0Test . ASYNC , result . getDesc ( ) ) |
testGetHeadRev_String_String_Empty_Result ( ) { java . lang . String url = repoRoot . getAbsolutePath ( ) ; org . eclipse . jgit . lib . ObjectId nonExistent = gitClient . getHeadRev ( url , "this<sp>branch<sp>doesn't<sp>exist" ) ; "<AssertPlaceHolder>" ; } getHeadRev ( java . lang . String , java . lang . String ) { f... | org . junit . Assert . assertNull ( nonExistent ) |
testSerialization_allBooleans ( ) { tableQueryConfig . setAutoAdjustRanges ( false ) ; tableQueryConfig . setOfflineScan ( true ) ; tableQueryConfig . setUseIsolatedScanners ( true ) ; tableQueryConfig . setUseLocalIterators ( true ) ; byte [ ] serialized = serialize ( tableQueryConfig ) ; org . apache . accumulo . cor... | org . junit . Assert . assertEquals ( tableQueryConfig , actualConfig ) |
entrySetToArrayWithTarget ( ) { com . gs . collections . api . map . sorted . MutableSortedMap < java . lang . Integer , java . lang . String > map = this . newMapWithKeyValue ( 1 , "One" ) . asUnmodifiable ( ) ; java . lang . Object [ ] entries = map . entrySet ( ) . toArray ( new java . lang . Object [ ] { } ) ; "<As... | org . junit . Assert . assertEquals ( com . gs . collections . impl . tuple . ImmutableEntry . of ( 1 , "One" ) , entries [ 0 ] ) |
deveObterNcmComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemProduto produto = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemProduto ( ) ; final java . lang . String ncm = "99999999" ; produto . setNcm ( ncm ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertEquals ( ncm , produto . getNcm ( ) ) |
testRegressionEvalTimeSeriesSplit ( ) { org . nd4j . linalg . api . ndarray . INDArray out1 = org . nd4j . linalg . factory . Nd4j . rand ( new int [ ] { 3 , 5 , 20 } ) ; org . nd4j . linalg . api . ndarray . INDArray outSub1 = out1 . get ( all ( ) , all ( ) , interval ( 0 , 10 ) ) ; org . nd4j . linalg . api . ndarray... | org . junit . Assert . assertEquals ( e1 , e2 ) |
savePerson ( ) { com . example . model . Person person = new com . example . model . Person ( ) ; person . setName ( "" ) ; person . setAge ( 18 ) ; int result = personService . savePserson ( person ) ; "<AssertPlaceHolder>" ; } setAge ( java . lang . Integer ) { this . age = age ; } | org . junit . Assert . assertEquals ( 1 , result ) |
testGetOrderByWithBlankTableNameReturnsUndecoratedTableName ( ) { com . liferay . portal . kernel . util . TableNameOrderByComparator < ? > tableNameOrderByComparator = new com . liferay . portal . kernel . util . TableNameOrderByComparator ( new com . liferay . portal . kernel . util . TableNameOrderByComparatorTest .... | org . junit . Assert . assertEquals ( "column1,<sp>column2" , tableNameOrderByComparator . getOrderBy ( ) ) |
testProvideAndRegisterDocumentSetBResponseFailureCase ( ) { gov . hhs . fha . nhinc . webserviceproxy . WebServiceProxyHelper proxyHelper = createMockWebServiceProxyHelper ( null ) ; gov . hhs . fha . nhinc . docsubmission . adapter . deferred . response . proxy . AdapterDocSubmissionDeferredResponseProxyWebServiceSecu... | org . junit . Assert . assertNull ( e . getReturnOverride ( ) ) |
testCantDeleteFileWhileWriting ( ) { java . nio . file . Path path = root . resolve ( "file" ) ; byte [ ] contents = new byte [ ] { 1 , 2 , 3 , 4 } ; java . nio . file . Files . createFile ( path ) ; try ( java . io . OutputStream os = java . nio . file . Files . newOutputStream ( path ) ) { java . nio . file . Files .... | org . junit . Assert . assertFalse ( java . nio . file . Files . exists ( path ) ) |
testUpdateNotificationRegistrationStatusAssertUpdateSuccessCaseInsensitive ( ) { org . finra . herd . model . api . xml . NotificationRegistrationKey notificationRegistrationKey = new org . finra . herd . model . api . xml . NotificationRegistrationKey ( NAMESPACE , NOTIFICATION_NAME ) ; notificationRegistrationDaoTest... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . NotificationRegistrationStatusUpdateResponse ( notificationRegistrationKey , org . finra . herd . model . jpa . NotificationRegistrationStatusEntity . DISABLED ) , response ) |
testGetQuantilesJSON ( ) { System . out . println ( "getQuantilesJSON" ) ; java . lang . Long [ ] rtimes = new java . lang . Long [ 0 ] ; net . sf . json . JSONObject result = kg . apc . jmeter . reporters . LoadosophiaClient . getQuantilesJSON ( rtimes ) ; "<AssertPlaceHolder>" ; } getQuantilesJSON ( java . lang . Lon... | org . junit . Assert . assertNotNull ( result ) |
testActieMetRelatieMetNietIngeschrevenen ( ) { final nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumEvtDeelsOnbekendAttribuut dag = new nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumEvtDeelsOnbekendAttribuut ( 20130513 ) ; final nl . bzk . brp . model . algemeen . attribuuttype . kern... | org . junit . Assert . assertEquals ( 2 , berichtContext . getAangemaakteBijhoudingsRootObjecten ( ) . size ( ) ) |
testUnsupportedPredicate ( ) { org . teiid . query . metadata . QueryMetadataInterface metadata = org . teiid . query . unittest . RealMetadataFactory . exampleMultiBinding ( ) ; final java . lang . String userSql = "SELECT<sp>phys.a<sp>FROM<sp>MultiModel.Phys<sp>where<sp>Phys.source_name<sp>like<sp>'a%'" ; final java ... | org . junit . Assert . assertEquals ( 3 , dataMgr . getCommandHistory ( ) . size ( ) ) |
deveObterMotivoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . NFProtocoloInfo protocoloInfo = new com . fincatto . documentofiscal . nfe310 . classes . NFProtocoloInfo ( ) ; final java . lang . String motivo = "Autorizado<sp>o<sp>seu<sp>uso" ; protocoloInfo . setMotivo ( motivo ) ; "<As... | org . junit . Assert . assertEquals ( motivo , protocoloInfo . getMotivo ( ) ) |
properSizeWhenClosed ( ) { org . apache . commons . compress . compressors . deflate64 . Deflate64CompressorInputStream input = new org . apache . commons . compress . compressors . deflate64 . Deflate64CompressorInputStream ( nullDecoder ) ; "<AssertPlaceHolder>" ; } available ( ) { return in . available ( ) ; } | org . junit . Assert . assertEquals ( 0 , input . available ( ) ) |
testUnkonwLineTagIsIgnored ( ) { java . lang . String in = "/**<sp>\n<sp>*<sp>@unkonwTagTitle<sp>\n<sp>*/" ; org . eclipse . n4js . jsdoc . tags . AbstractLineTagDefinition tag = new org . eclipse . n4js . jsdoc . DocletParserTest . StubLineTagDefinition ( "stubLineTagTitle" ) ; org . eclipse . n4js . jsdoc . DocletPar... | org . junit . Assert . assertEquals ( 0 , doclet . getLineTags ( ) . size ( ) ) |
testTurtle ( ) { try { java . net . URL url = new java . net . URL ( "http://example.com/" ) ; com . github . anno4j . io . ObjectParser objectParser = new com . github . anno4j . io . ObjectParser ( ) ; java . util . List < com . github . anno4j . model . Annotation > annotations = objectParser . parse ( com . github ... | org . junit . Assert . assertEquals ( 1 , annotations . size ( ) ) |
testGetApiVersion ( ) { org . apache . ambari . server . api . services . Request request = getTestRequest ( null , null , null , null , null , null , null ) ; "<AssertPlaceHolder>" ; } getAPIVersion ( ) { return 0 ; } | org . junit . Assert . assertEquals ( 1 , request . getAPIVersion ( ) ) |
testEmptyIntersectionSingleElements ( ) { org . antlr . v4 . runtime . misc . IntervalSet s = org . antlr . v4 . runtime . misc . IntervalSet . of ( 'a' ) ; org . antlr . v4 . runtime . misc . IntervalSet s2 = org . antlr . v4 . runtime . misc . IntervalSet . of ( 'd' ) ; java . lang . String expecting = "{}" ; java . ... | org . junit . Assert . assertEquals ( expecting , result ) |
testSymlinkTreeRuleKeyDoesNotChangeIfLinkTargetsChangeOnUnix ( ) { graphBuilder . addToIndex ( symlinkTreeBuildRule ) ; com . facebook . buck . rules . keys . InputBasedRuleKeyFactory ruleKeyFactory = new com . facebook . buck . rules . keys . TestInputBasedRuleKeyFactory ( com . facebook . buck . testutil . FakeFileHa... | org . junit . Assert . assertEquals ( key1 , key2 ) |
sliding_A$int_Nil ( ) { com . m3 . scalaflavor4j . Seq < java . lang . Integer > seq = com . m3 . scalaflavor4j . IndexedSeq . apply ( ) ; java . lang . Integer size = 3 ; com . m3 . scalaflavor4j . Seq < com . m3 . scalaflavor4j . Seq < java . lang . Integer > > actual = seq . sliding ( size ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertThat ( actual . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 0 ) ) ) |
testCalendar_CreateDate20121215_MatchesExpected ( ) { int year = 2012 ; int month = 12 ; int day = 15 ; java . util . Date actual = info . michaelkohler . helpertools . date . CalendarHelper . date ( year , month , day ) ; java . util . Date expected = new java . util . GregorianCalendar ( 2012 , 11 , 15 ) . getTime ( ... | org . junit . Assert . assertEquals ( expected , actual ) |
testCheckActualRequestType ( ) { org . ebaysf . web . cors . MockHttpServletRequest request = new org . ebaysf . web . cors . MockHttpServletRequest ( ) ; request . setHeader ( CORSFilter . REQUEST_HEADER_ORIGIN , TestConfigs . HTTP_TOMCAT_APACHE_ORG ) ; request . setMethod ( "PUT" ) ; org . ebaysf . web . cors . CORSF... | org . junit . Assert . assertEquals ( CORSFilter . CORSRequestType . ACTUAL , requestType ) |
test ( ) { org . apache . hadoop . hbase . regionserver . HRegion region = org . apache . hadoop . hbase . regionserver . TestOpenSeqNumUnexpectedIncrease . UTIL . getMiniHBaseCluster ( ) . getRegions ( org . apache . hadoop . hbase . regionserver . TestOpenSeqNumUnexpectedIncrease . TABLE_NAME ) . get ( 0 ) ; long ope... | org . junit . Assert . assertEquals ( ( openSeqNum + 2 ) , openSeqNum1 ) |
testInitialize_ifArtifactJarPathIsInvalidContainerResolvedFromScratch ( ) { "<AssertPlaceHolder>" ; org . eclipse . jdt . core . IClasspathEntry entry = mock ( org . eclipse . jdt . core . IClasspathEntry . class ) ; when ( entry . getPath ( ) ) . thenReturn ( new org . eclipse . core . runtime . Path ( com . google . ... | org . junit . Assert . assertFalse ( new java . io . File ( com . google . cloud . tools . eclipse . appengine . libraries . LibraryClasspathContainerInitializerTest . NON_EXISTENT_FILE ) . exists ( ) ) |
testObjectHolderT ( ) { final net . objectlab . kit . util . ObjectHolder < java . lang . Integer > it = new net . objectlab . kit . util . ObjectHolder ( java . lang . Integer . valueOf ( 987987 ) ) ; "<AssertPlaceHolder>" ; } valueOf ( java . lang . String ) { final java . lang . StringBuilder unitsBuf = new java . l... | org . junit . Assert . assertEquals ( "value" , java . lang . Integer . valueOf ( 987987 ) , it . getValue ( ) ) |
testDefaultConnectionFactory ( ) { javax . jms . ConnectionFactory factory = ( ( javax . jms . ConnectionFactory ) ( context . lookup ( "java:/jms/my-remote-activemq" ) ) ) ; "<AssertPlaceHolder>" ; } lookup ( java . lang . String ) { return new org . wildfly . swarm . microprofile . faulttolerance . deployment . Micro... | org . junit . Assert . assertNotNull ( factory ) |
getDenied ( ) { denieSpaceAuthorizationToUsers ( ) ; try { get ( ) ; org . junit . Assert . fail ( "An<sp>unauthorized<sp>user<sp>shouldn't<sp>access<sp>the<sp>space" ) ; } catch ( final com . sun . jersey . api . client . UniformInterfaceException ex ) { final int receivedStatus = ex . getResponse ( ) . getStatus ( ) ... | org . junit . Assert . assertThat ( receivedStatus , org . hamcrest . Matchers . is ( forbidden ) ) |
testNullClient ( ) { com . stratio . connector . commons . engine . query . ProjectParsed parsedQuery = mock ( com . stratio . connector . commons . engine . query . ProjectParsed . class ) ; try { connectorQueryBuilder . buildQuery ( null , parsedQuery ) ; } catch ( java . lang . Exception exception ) { "<AssertPlaceH... | org . junit . Assert . assertTrue ( ( exception instanceof com . stratio . crossdata . common . exceptions . ExecutionException ) ) |
testWriteClassName3 ( ) { testcase . function . User1 user = new testcase . function . User1 ( ) ; user . setB ( true ) ; com . jd . dd . glowworm . util . Parameters p = new com . jd . dd . glowworm . util . Parameters ( ) ; p . setNeedWriteClassName ( false ) ; testcase . function . User1 result = ( ( testcase . func... | org . junit . Assert . assertNull ( result ) |
update_with_null_links ( ) { pojos . initData ( ) ; org . nutz . dao . test . meta . Platoon p = dao . fetch ( org . nutz . dao . test . meta . Platoon . class , "sF" ) ; p . setLeaderName ( "xyz" ) ; dao . updateWith ( p , null ) ; p = dao . fetch ( org . nutz . dao . test . meta . Platoon . class , "sF" ) ; "<AssertP... | org . junit . Assert . assertEquals ( "xyz" , p . getLeaderName ( ) ) |
testZeroMemory ( ) { for ( int k = 1 ; k < 8 ; k ++ ) { for ( int i = 1 ; i < 128 ; i ++ ) { final tlc2 . tool . fp . LongArray array = new tlc2 . tool . fp . LongArray ( i ) ; array . zeroMemory ( k ) ; for ( int j = 0 ; i < j ; i ++ ) { "<AssertPlaceHolder>" ; } for ( int j = 0 ; i < j ; i ++ ) { array . set ( j , ( ... | org . junit . Assert . assertEquals ( 0L , array . get ( j ) ) |
testDPLLSucceedsWithStackOverflowBugReport1 ( ) { aima . core . logic . propositional . parsing . ast . Sentence sentence = ( ( aima . core . logic . propositional . parsing . ast . Sentence ) ( parser . parse ( "(A<sp>|<sp>~A)<sp>&<sp>(A<sp>|<sp>B)" ) ) ) ; "<AssertPlaceHolder>" ; } dpllSatisfiable ( aima . core . log... | org . junit . Assert . assertTrue ( dpll . dpllSatisfiable ( sentence ) ) |
testGenerateColumnWhenColumnIsNew ( ) { final org . drools . workbench . models . guided . dtable . shared . model . ActionRetractFactCol52 expectedColumn = mock ( org . drools . workbench . models . guided . dtable . shared . model . ActionRetractFactCol52 . class ) ; doReturn ( true ) . when ( plugin ) . isNewColumn ... | org . junit . Assert . assertTrue ( plugin . generateColumn ( ) ) |
testNameOnly ( ) { final org . apache . nifi . components . PropertyValue nameValue = new org . apache . nifi . util . MockPropertyValue ( "person" ) ; final org . apache . nifi . components . PropertyValue branchValue = new org . apache . nifi . util . MockPropertyValue ( null ) ; final org . apache . nifi . component... | org . junit . Assert . assertNotNull ( retrievedSchema ) |
fail ( ) { if ( Main . DO_FAIL ) "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 0 , 1 ) |
test_intArray_withType ( ) { int [ ] data = new int [ ] { 234 , 0 , - 1 } ; com . alibaba . dubbo . common . serialize . ObjectOutput objectOutput = serialization . serialize ( url , byteArrayOutputStream ) ; objectOutput . writeObject ( data ) ; objectOutput . flushBuffer ( ) ; java . io . ByteArrayInputStream byteArr... | org . junit . Assert . assertArrayEquals ( data , ( ( int [ ] ) ( deserialize . readObject ( int [ ] . class ) ) ) ) |
testCreateLinkMaxPathLink ( ) { org . apache . hadoop . fs . Path dir = new org . apache . hadoop . fs . Path ( testBaseDir1 ( ) ) ; org . apache . hadoop . fs . Path file = new org . apache . hadoop . fs . Path ( testBaseDir1 ( ) , "file" ) ; final int maxPathLen = org . apache . hadoop . hdfs . protocol . HdfsConstan... | org . junit . Assert . assertEquals ( maxPathLen , ( dirLen + ( link . toString ( ) . length ( ) ) ) ) |
testDbClientSanity ( ) { com . emc . storageos . db . client . model . StoragePool pool1 = new com . emc . storageos . db . client . model . StoragePool ( ) ; pool1 . setId ( java . net . URI . create ( "pool1" ) ) ; pool1 . setLabel ( "Pool1" ) ; _dbClient . createObject ( pool1 ) ; com . emc . storageos . db . client... | org . junit . Assert . assertNotNull ( tempPool ) |
testSetFocusItemByIndex3 ( ) { viewMock . display ( de . lessvoid . nifty . controls . listbox . ListBoxTestTool . buildValues ( o3 , o4 ) , 1 , de . lessvoid . nifty . controls . listbox . ListBoxTestTool . buildValuesSelection ( ) ) ; viewMock . scrollTo ( 2 ) ; replay ( viewMock ) ; listBox . setFocusItemByIndex ( 3... | org . junit . Assert . assertEquals ( 3 , listBox . getFocusItemIndex ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.