input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
mustNotStartRecurringTasksWherePriorExecutionHasNotYetFinished ( ) { java . lang . Runnable runnable = ( ) -> { counter . incrementAndGet ( ) ; semaphore . acquireUninterruptibly ( ) ; } ; scheduler . submit ( Group . STORAGE_MAINTENANCE , runnable , 100 , 100 ) ; for ( int i = 0 ; i < 4 ; i ++ ) { scheduler . tick ( )... | org . junit . Assert . assertThat ( counter . get ( ) , org . hamcrest . Matchers . is ( 1 ) ) |
test_search_with_moduleName_componentNames_flowNames_keyword_success ( ) { java . nio . file . Path path = createTempDir ( ) ; org . apache . solr . core . SolrResourceLoader loader = new org . apache . solr . core . SolrResourceLoader ( path ) ; org . apache . solr . core . NodeConfig config = new org . apache . solr ... | org . junit . Assert . assertEquals ( "testnode" 3 , results . getResultSize ( ) , 2 ) |
contextRefreshedWhileContextAlreadyBound ( ) { org . togglz . spring . util . ContextClassLoaderApplicationContextHolder . bind ( mock ( org . springframework . context . ApplicationContext . class ) ) ; applicationContext = mock ( org . springframework . context . ApplicationContext . class ) ; org . springframework .... | org . junit . Assert . assertSame ( applicationContext , org . togglz . spring . util . ContextClassLoaderApplicationContextHolder . get ( ) ) |
testSetIntegerX ( ) { instance . setX ( 5 ) ; "<AssertPlaceHolder>" ; } intX ( ) { return ( ( int ) ( java . lang . Math . round ( x ) ) ) ; } | org . junit . Assert . assertEquals ( 5 , instance . intX ( ) ) |
addGzip ( ) { execute ( new org . basex . build . Add ( "" , org . basex . build . AddDeleteTest . GZIPFILE ) ) ; execute ( new org . basex . build . Add ( "bar" , org . basex . build . AddDeleteTest . GZIPFILE ) ) ; execute ( new org . basex . build . Delete ( "bar" ) ) ; "<AssertPlaceHolder>" ; } docs ( ) { return co... | org . junit . Assert . assertEquals ( 1 , org . basex . build . AddDeleteTest . docs ( ) ) |
shouldFilterUsingMillisecondsByDefault ( ) { final uk . gov . gchq . gaffer . time . RBMBackedTimestampSet timestampSet = createTimestampSet ( ) ; maskTimestampSetByTimeRange . setStartTime ( instant . plus ( java . time . Duration . ofDays ( 100 ) ) . toEpochMilli ( ) ) ; maskTimestampSetByTimeRange . setEndTime ( ins... | org . junit . Assert . assertEquals ( expectedTimestampSet , actualTimestampSet ) |
testToDatastore_2 ( ) { float f = 1.0F ; com . jmethods . catatumbo . mappers . FloatMapper mapper = new com . jmethods . catatumbo . mappers . FloatMapper ( ) ; com . google . cloud . datastore . Value output = mapper . toDatastore ( f ) . build ( ) ; System . out . printf ( "%s<sp>---><sp>%s%n" , f , output . get ( )... | org . junit . Assert . assertTrue ( java . lang . Double . valueOf ( f ) . equals ( output . get ( ) ) ) |
testConstructConsumer ( ) { org . apache . servicecomb . core . Invocation invocation = org . mockito . Mockito . mock ( org . apache . servicecomb . core . Invocation . class ) ; org . mockito . Mockito . when ( invocation . getOperationMeta ( ) ) . thenReturn ( org . mockito . Mockito . mock ( org . apache . servicec... | org . junit . Assert . assertNotNull ( response ) |
testLargeMessage ( ) { java . sql . Statement s = conn . createStatement ( ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "SELECT<sp>'" ) ; for ( int i = 0 ; i < ( org . teiid . transport . TestJDBCSocketTransport . MAX_MESSAGE ) ; i ++ ) { sb . append ( 'a' ) ; } sb . append (... | org . junit . Assert . assertEquals ( 1 , rs . getInt ( 1 ) ) |
testFailParsingQOSLevelNotInRange ( ) { try { builder . withQos ( "72" ) . buildAndConnect ( ) ; org . junit . Assert . fail ( "Should<sp>of<sp>failed<sp>initialization." ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } | org . junit . Assert . assertTrue ( ( e instanceof java . lang . IllegalArgumentException ) ) |
localSocket ( ) { requireMinimumVersion ( 5 , 1 ) ; org . junit . Assume . assumeTrue ( ( ( java . lang . System . getenv ( "TRAVIS" ) ) == null ) ) ; org . junit . Assume . assumeTrue ( isLocalConnection ( "localSocket" ) ) ; java . sql . Statement st = sharedConnection . createStatement ( ) ; java . sql . ResultSet r... | org . junit . Assert . assertTrue ( rs . next ( ) ) |
shouldInjectApplication ( ) { final roboguice . activity . SherlockActivityInjectionTest . G g = org . robolectric . Robolectric . buildActivity ( roboguice . activity . SherlockActivityInjectionTest . G . class ) . create ( ) . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return null ; } | org . junit . Assert . assertThat ( g . application , org . hamcrest . CoreMatchers . equalTo ( Robolectric . application ) ) |
testGetDimensionType ( ) { final org . pentaho . metadata . model . LogicalTable logicalTable = mock ( org . pentaho . metadata . model . LogicalTable . class ) ; final org . pentaho . di . starmodeler . DimensionType dtDate = DimensionType . DATE ; when ( logicalTable . getProperty ( DefaultIDs . LOGICAL_TABLE_DIMENSI... | org . junit . Assert . assertEquals ( dtDate , dimensionType ) |
isSentinelAutoProcess ( ) { service . stopSentinelAutoProcess ( configModel , ( - 7 ) ) ; "<AssertPlaceHolder>" ; } isSentinelAutoProcess ( ) { service . stopSentinelAutoProcess ( configModel , ( - 7 ) ) ; org . junit . Assert . assertTrue ( service . isSentinelAutoProcess ( ) ) ; } | org . junit . Assert . assertTrue ( service . isSentinelAutoProcess ( ) ) |
testTXTBasedAtomTypeConfigurator ( ) { org . openscience . cdk . config . TXTBasedAtomTypeConfigurator configurator = new org . openscience . cdk . config . TXTBasedAtomTypeConfigurator ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( configurator ) |
testDeleteUserInfo ( ) { org . flowable . idm . api . User savedUser = null ; try { org . flowable . idm . api . User newUser = identityService . newUser ( "testuser" ) ; newUser . setFirstName ( "Fred" ) ; newUser . setLastName ( "McDonald" ) ; newUser . setEmail ( "no-reply@activiti.org" ) ; identityService . saveUse... | org . junit . Assert . assertNull ( identityService . getUserInfo ( newUser . getId ( ) , "key1" ) ) |
testOptional ( ) { uk . me . rkd . jsipp . runtime . network . SocketManager sm = mock ( uk . me . rkd . jsipp . runtime . network . SocketManager . class ) ; uk . me . rkd . jsipp . runtime . Scheduler sched = new uk . me . rkd . jsipp . runtime . Scheduler ( 1 ) ; uk . me . rkd . jsipp . compiler . Scenario s = uk . ... | org . junit . Assert . assertTrue ( c . hasCompleted ( ) ) |
serializeWithSingleConnectionTest ( ) { try { de . rub . nds . tlsattacker . core . workflow . WorkflowTrace trace = new de . rub . nds . tlsattacker . core . workflow . WorkflowTrace ( ) ; action = new de . rub . nds . tlsattacker . core . workflow . action . SendAction ( new de . rub . nds . tlsattacker . core . prot... | org . junit . Assert . assertEquals ( actual , expected ) |
testAppendToEmpty ( ) { final org . apache . isis . applib . util . TitleBuffer t = new org . apache . isis . applib . util . TitleBuffer ( ) ; t . append ( "test" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( "Link<sp>[rel=" + ( getRel ( ) ) ) + ",<sp>href=" ) + ( getHref ( ) ) ) + ",<sp>method=" )... | org . junit . Assert . assertEquals ( "test" , t . toString ( ) ) |
testFindBillingLocations ( ) { java . util . List < java . lang . Object [ ] > result = dao . findBillingLocations ( "ON" ) ; "<AssertPlaceHolder>" ; } findBillingLocations ( java . lang . String ) { javax . persistence . Query query = entityManager . createNativeQuery ( "SELECT<sp>billinglocation,billinglocation_desc<... | org . junit . Assert . assertNotNull ( result ) |
testValidationSuccess ( ) { final org . apache . nifi . websocket . jetty . JettyWebSocketClient service = new org . apache . nifi . websocket . jetty . JettyWebSocketClient ( ) ; final org . apache . nifi . websocket . jetty . ControllerServiceTestContext context = new org . apache . nifi . websocket . jetty . Control... | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
testGetMaxVersionSQL ( ) { java . lang . String expected = "SELECT<sp>ROW_VERSION<sp>FROM<sp>T123S" ; java . lang . String result = org . sagebionetworks . table . cluster . SQLUtils . getStatusMaxVersionSQL ( "123" ) ; "<AssertPlaceHolder>" ; } getStatusMaxVersionSQL ( java . lang . String ) { return ( ( "SELECT<sp>" ... | org . junit . Assert . assertEquals ( expected , result ) |
testEntityIndexing ( ) { final org . apache . rya . indexing . accumulo . entity . EntityCentricIndex entity = new org . apache . rya . indexing . accumulo . entity . EntityCentricIndex ( ) ; entity . setConf ( conf ) ; final org . apache . rya . api . domain . RyaStatement input = org . apache . rya . api . domain . R... | org . junit . Assert . assertEquals ( expected , inserted ) |
testObtenerListaDeDescuentos ( ) { log . debug ( "Muestra<sp>lista<sp>de<sp>tipos<sp>de<sp>descuentos" ) ; mx . edu . um . mateo . general . model . Usuario usuario = obtieneUsuario ( ) ; mx . edu . um . mateo . inscripciones . model . AFETipoDescuento afeTipoDescuento = null ; mx . edu . um . mateo . general . model .... | org . junit . Assert . assertNotNull ( afeTipoDescuento . getId ( ) ) |
deveObterRazaoSocialComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral retorno = new com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral ( ) ; retorno . setRazaoSocial ( "Pedro<sp>d... | org . junit . Assert . assertEquals ( "Pedro<sp>da<sp>Silva" , retorno . getRazaoSocial ( ) ) |
testGetSafeFieldname ( ) { org . pentaho . di . core . database . MonetDBDatabaseMeta meta = new org . pentaho . di . core . database . MonetDBDatabaseMeta ( ) ; java . lang . String expected = "hello_world" ; java . lang . String fieldname = "hello<sp>world" ; java . lang . String result = meta . getSafeFieldname ( fi... | org . junit . Assert . assertEquals ( expected , result ) |
testUpdateExecution ( ) { org . teiid . dqp . message . AtomicResultsMessage results = helpExecuteUpdate ( false , true ) ; "<AssertPlaceHolder>" ; } getResults ( ) { return results ; } | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 1 ) , results . getResults ( ) [ 0 ] . get ( 0 ) ) |
agTest1 ( ) { int agTest1 = agTest . agTest1 ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( ( agTest1 == 2 ) ) |
shouldResolveURI ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( uri ) |
phShouldUsePlaceholderMap ( ) { mockStatic ( org . codegist . crest . util . Placeholders . class ) ; when ( org . codegist . crest . util . Placeholders . merge ( placeholders , "a" ) ) . thenReturn ( "aa" ) ; java . lang . String actual = toTest . ph ( "a" ) ; "<AssertPlaceHolder>" ; } ph ( java . lang . String ) { r... | org . junit . Assert . assertEquals ( "aa" , actual ) |
testGetAggregationIntervalInMillis ( ) { "<AssertPlaceHolder>" ; } getAggregationIntervalInMillis ( ) { return org . peerbox . app . config . PeerWaspConfig . AGGREGATION_TIME_MS ; } | org . junit . Assert . assertTrue ( ( ( config . getAggregationIntervalInMillis ( ) ) >= 1 ) ) |
testReadonlyRootfs ( ) { org . apache . commons . lang3 . tuple . Pair [ ] data = new org . apache . commons . lang3 . tuple . Pair [ ] { org . apache . commons . lang3 . tuple . Pair . of ( Boolean . TRUE , "{ReadonlyRootfs:<sp>true}" ) , org . apache . commons . lang3 . tuple . Pair . of ( Boolean . FALSE , "{Readonl... | org . junit . Assert . assertEquals ( expected , result ) |
testAddRemove ( ) { com . vaadin . ui . AbstractComponent component = getComponent ( ) ; component . addStyleName ( "style1" ) ; component . addStyleName ( "style2" ) ; component . removeStyleName ( "style1" ) ; "<AssertPlaceHolder>" ; } getStyleName ( ) { return styleName ; } | org . junit . Assert . assertEquals ( component . getStyleName ( ) , "style2" ) |
shouldGiveErrorsIfInvalidGlcode ( ) { when ( chartOfAccountsService . getByGlCode ( org . mockito . Matchers . anyString ( ) ) ) . thenReturn ( null ) ; errors = billService . validateBillRegister ( billRegister ) ; "<AssertPlaceHolder>" ; } size ( ) { return messages . size ( ) ; } | org . junit . Assert . assertEquals ( 5 , errors . size ( ) ) |
testCloneProfile ( ) { final org . jboss . as . controller . client . helpers . domain . DomainClient client = org . jboss . as . test . integration . domain . ServerManagementTestCase . domainMasterLifecycleUtil . getDomainClient ( ) ; try { final org . jboss . dmr . ModelNode composite = new org . jboss . dmr . Model... | org . junit . Assert . assertEquals ( master , slave ) |
testGetTileMatrixSet ( ) { org . deegree . tile . TileMatrixSet matrixSet = client . getTileMatrixSet ( "Satellite_Provo" ) ; "<AssertPlaceHolder>" ; } getTileMatrixSet ( java . lang . String ) { java . util . List < org . deegree . tile . TileMatrixSet > tileMatrixSets = getTileMatrixSets ( ) ; for ( org . deegree . t... | org . junit . Assert . assertNotNull ( matrixSet ) |
handleCleanupWithStateWhenAwaitingOnClosingOutputReceivers ( ) { java . lang . Exception testException = new java . lang . Exception ( ) ; org . apache . beam . sdk . fn . data . InboundDataClient mockOutputReceiver = mock ( org . apache . beam . sdk . fn . data . InboundDataClient . class ) ; org . apache . beam . sdk... | org . junit . Assert . assertEquals ( testException , e ) |
testSetMaxCount ( ) { builder . setLimit ( 0 , 25 ) ; "<AssertPlaceHolder>" ; } getMaxCount ( ) { return maxCount ; } | org . junit . Assert . assertEquals ( 25 , builder . getMaxCount ( ) ) |
getWatermarkForUpdatedSourceTransform ( ) { org . apache . beam . runners . direct . CommittedBundle < java . lang . Integer > output = multiWindowedBundle ( createdInts , 1 ) ; manager . updateWatermarks ( null , org . apache . beam . runners . direct . WatermarkManager . TimerUpdate . empty ( ) , graph . getProducer ... | org . junit . Assert . assertThat ( updatedSourceWatermark . getOutputWatermark ( ) , org . hamcrest . Matchers . equalTo ( new org . joda . time . Instant ( 8000L ) ) ) |
testAppliesToSubscription_Excluded ( ) { org . lilyproject . util . repo . RecordEvent . IndexRecordFilterData filterData = new org . lilyproject . util . repo . RecordEvent . IndexRecordFilterData ( ) ; filterData . setSubscriptionExclusions ( com . google . common . collect . ImmutableSet . of ( "to_exclude" ) ) ; "<... | org . junit . Assert . assertFalse ( filterData . appliesToSubscription ( "to_exclude" ) ) |
testGetMetadataBucket ( ) { final ch . cyberduck . core . Path container = new ch . cyberduck . core . Path ( "test-us-east-1-cyberduck" , java . util . EnumSet . of ( Path . Type . volume ) ) ; final java . util . Map < java . lang . String , java . lang . String > metadata = new ch . cyberduck . core . s3 . S3Metadat... | org . junit . Assert . assertTrue ( metadata . isEmpty ( ) ) |
shouldNotInjectIfConfigUuidDoesNotMatch ( ) { org . openqa . selenium . ImmutableCapabilities config = new org . openqa . selenium . ImmutableCapabilities ( "browserName" , "chrome" , "chrome_binary" , "binary" , org . openqa . grid . internal . utils . configuration . GridNodeConfiguration . CONFIG_UUID_CAPABILITY , "... | org . junit . Assert . assertEquals ( options . get ( "binary" ) , "cheese" ) |
slice_A$int$int_Nil ( ) { com . m3 . scalaflavor4j . Seq < java . lang . Integer > seq = com . m3 . scalaflavor4j . IndexedSeq . apply ( ) ; java . lang . Integer from = 2 ; java . lang . Integer until = 4 ; com . m3 . scalaflavor4j . Seq < java . lang . Integer > actual = seq . slice ( from , until ) ; "<AssertPlaceHo... | org . junit . Assert . assertThat ( actual . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 0 ) ) ) |
testCandy2 ( ) { int [ ] ratings = new int [ 20000 ] ; int sum = 0 ; for ( int i = 0 ; i < ( ratings . length ) ; i ++ ) { ratings [ i ] = i + 1 ; sum += ratings [ i ] ; } "<AssertPlaceHolder>" ; } candy ( int [ ] ) { int [ ] scanLeft = new int [ ratings . length ] ; java . util . Arrays . fill ( scanLeft , 1 ) ; for (... | org . junit . Assert . assertEquals ( sum , candy . candy ( ratings ) ) |
testInt ( ) { com . google . common . reflect . TypeToken < java . lang . Integer > type = new com . google . common . reflect . TypeToken < java . lang . Integer > ( ) { } ; java . io . PipedOutputStream os = new java . io . PipedOutputStream ( ) ; java . io . PipedInputStream is = new java . io . PipedInputStream ( o... | org . junit . Assert . assertEquals ( 12234234 , value ) |
level2MissMinus1 ( ) { final int i = ( 1 << ( ( com . zaxxer . sparsebits . SparseBitSet . SHIFT3 ) + ( com . zaxxer . sparsebits . SparseBitSet . SHIFT2 ) ) ) - 1 ; set . set ( i ) ; final int ret = set . previousClearBit ( i ) ; "<AssertPlaceHolder>" ; } previousClearBit ( int ) { if ( i < 0 ) { if ( i == ( - 1 ) ) r... | org . junit . Assert . assertEquals ( ( i - 1 ) , ret ) |
testGetMainRibRoutesWhenEmptyRib ( ) { java . util . SortedMap < java . lang . String , java . util . SortedMap < java . lang . String , org . batfish . datamodel . GenericRib < org . batfish . datamodel . AbstractRouteDecorator > > > ribs = com . google . common . collect . ImmutableSortedMap . of ( "n1" , com . googl... | org . junit . Assert . assertThat ( actual . entrySet ( ) , org . hamcrest . Matchers . hasSize ( 0 ) ) |
shouldPrepareProjectionArguments ( ) { final java . util . Map < java . lang . String , java . lang . String > projectionValues = new java . util . HashMap ( ) ; projectionValues . put ( "pints" , "100" ) ; projectionValues . put ( "alcoholics" , "25" ) ; uut = com . github . bmsantos . core . cola . story . processor ... | org . junit . Assert . assertThat ( asList ( result ) , org . hamcrest . Matchers . contains ( ( ( java . lang . Object ) ( "100" ) ) , ( ( java . lang . Object ) ( "25" ) ) ) ) |
testDoExecute ( ) { boolean isOk = updateHiveTask . doExecute ( ) ; "<AssertPlaceHolder>" ; } doExecute ( ) { boolean result = true ; java . util . List < org . talend . dataquality . indicators . definition . IndicatorDefinition > indiDefinitions = org . talend . dq . indicators . definitions . DefinitionHandler . get... | org . junit . Assert . assertTrue ( isOk ) |
renameUserMustRenameUserAuthorities ( ) { de . blizzy . documentr . access . User user = new de . blizzy . documentr . access . User ( "user" , "p" , "email" , true ) ; userStore . saveUser ( user , de . blizzy . documentr . access . UserStoreTest . USER ) ; de . blizzy . documentr . access . RoleGrantedAuthority rga =... | org . junit . Assert . assertFalse ( userStore . getUserAuthorities ( "user2" ) . isEmpty ( ) ) |
isMultiSelectQueryPredicateCreatorConstructorWorking ( ) { final java . lang . reflect . Constructor < com . uaihebert . uaicriteria . predicate . MultiSelectQueryPredicateCreator > constructor = com . uaihebert . uaicriteria . predicate . MultiSelectQueryPredicateCreator . class . getDeclaredConstructor ( new java . l... | org . junit . Assert . assertNotNull ( object ) |
testTryCatchCaseAsStatement ( ) { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "try<sp>{" ) ; _builder . newLine ( ) ; _builder . newLine ( ) ; _builder . append ( "}<sp>catch<sp>(final<sp>Exception<sp>e)<sp>{" ) ; _builde... | org . junit . Assert . assertEquals ( _builder_1 . toString ( ) , statement ) |
testFilterWithoutOutputList ( ) { java . util . List < java . lang . String > expectedOutputList = new java . util . ArrayList ( ) ; expectedOutputList . add ( "b" ) ; java . util . List < java . lang . String > inputList = new java . util . ArrayList ( ) ; inputList . add ( "a" ) ; inputList . add ( "b" ) ; inputList ... | org . junit . Assert . assertEquals ( expectedOutputList , actualOutputList ) |
testCodeSourceUrl ( ) { final java . lang . String className = org . drools . core . rule . PackageCompilationDataTest . TestEvalExpression . class . getName ( ) ; org . drools . core . impl . KnowledgeBaseImpl kBase = new org . drools . core . impl . KnowledgeBaseImpl ( "xxx" , null ) ; org . drools . core . definitio... | org . junit . Assert . assertNotNull ( codeSource . getLocation ( ) ) |
testClient ( ) { be . e_contract . mycarenet . sts . EHealthSTSClient client = new be . e_contract . mycarenet . sts . EHealthSTSClient ( "https://services-acpt.ehealth.fgov.be/IAM/Saml11TokenService/Legacy/v1" ) ; java . security . Security . addProvider ( new be . fedict . commons . eid . jca . BeIDProvider ( ) ) ; j... | org . junit . Assert . assertNotNull ( assertionElement ) |
testApply ( ) { resolver . withClass ( org . apache . metron . stellar . dsl . functions . resolver . SimpleFunctionResolverTest . IAmAFunction . class ) ; final java . lang . String functionName = "namespace_function" ; org . apache . metron . stellar . dsl . StellarFunction fn = resolver . apply ( functionName ) ; "<... | org . junit . Assert . assertTrue ( ( fn instanceof org . apache . metron . stellar . dsl . functions . resolver . SimpleFunctionResolverTest . IAmAFunction ) ) |
testVerwijderAfnemerIndicatieMetRegelsMetFout ( ) { final int persoonId = 504 ; final int dienstIdVerwijderen = 1 ; final nl . bzk . brp . levering . afnemerindicaties . model . BewerkAfnemerindicatieResultaat resultaat = afnemerindicatiesMetRegelsService . verwijderAfnemerindicatie ( toegangLeveringsautorisatieId , pe... | org . junit . Assert . assertEquals ( 1 , resultaat . getMeldingen ( ) . size ( ) ) |
fileByFilename ( ) { io . grpc . reflection . v1alpha . ServerReflectionRequest request = io . grpc . reflection . v1alpha . ServerReflectionRequest . newBuilder ( ) . setHost ( io . grpc . protobuf . services . ProtoReflectionServiceTest . TEST_HOST ) . setFileByFilename ( "io/grpc/reflection/testing/reflection_test_d... | org . junit . Assert . assertEquals ( goldenResponse , responseObserver . firstValue ( ) . get ( ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . social . kernel . model . SocialActivityLimit . class , _dynamicQueryClassLoader ) ; dynamicQuery . setPr... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
test_getIntersections_Line ( ) { org . eclipse . gef . geometry . planar . Ellipse e = new org . eclipse . gef . geometry . planar . Ellipse ( 0 , 0 , 100 , 50 ) ; org . eclipse . gef . geometry . planar . Line lh = new org . eclipse . gef . geometry . planar . Line ( 0 , 25 , 100 , 25 ) ; org . eclipse . gef . geometr... | org . junit . Assert . assertEquals ( 0 , is . length ) |
testPropertyIsLessThanStringLiteral ( ) { net . opengis . filter . v_1_1_0 . FilterType filterType = cswFilterDelegate . propertyIsLessThan ( propertyName , stringLiteral ) ; java . lang . String cqlText = org . codice . ddf . spatial . ogc . csw . catalog . source . CswCqlTextFilter . getInstance ( ) . getCqlText ( fi... | org . junit . Assert . assertEquals ( propertyIsLessThan , cqlText ) |
testAsHTMLElementForHTMLElement ( ) { final elemental2 . dom . org . jboss . errai . common . client . dom . HTMLElement deprecatedElement = mock ( elemental2 . dom . HTMLElement . class ) ; final elemental2 . dom . HTMLElement htmlElement = mock ( elemental2 . dom . HTMLElement . class ) ; mockJsCast ( deprecatedEleme... | org . junit . Assert . assertSame ( deprecatedElement , actualElement ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . subscription . model . Subscription . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . lif... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
setInterval_anInteger_intervalIsSet ( ) { int anInterval = 41 ; confirmation . setInterval ( anInterval ) ; "<AssertPlaceHolder>" ; } getInterval ( ) { return interval ; } | org . junit . Assert . assertThat ( confirmation . getInterval ( ) , org . hamcrest . CoreMatchers . equalTo ( anInterval ) ) |
testCompletorNonCondidates ( ) { final org . openspotlight . graph . query . console . completor . SLQLFileNameCompletor completor = new org . openspotlight . graph . query . console . completor . SLQLFileNameCompletor ( null ) ; final java . util . List < ? > candidates = new java . util . LinkedList < java . lang . O... | org . junit . Assert . assertThat ( candidates . size ( ) , org . hamcrest . core . Is . is ( 0 ) ) |
testMaxAggregation ( ) { com . liferay . portal . search . aggregation . metrics . MaxAggregation maxAggregation = com . liferay . portal . search . aggregations . test . AggregationsInstantiationTest . _aggregations . max ( "name" , "field" ) ; "<AssertPlaceHolder>" ; } max ( java . lang . String , java . lang . Strin... | org . junit . Assert . assertNotNull ( maxAggregation ) |
testTime ( ) { org . eclipse . microprofile . metrics . Timer timer = registry . timer ( "testTime" ) ; double beforeStartTime = java . lang . System . nanoTime ( ) ; org . eclipse . microprofile . metrics . Timer . Context context = timer . time ( ) ; double afterStartTime = java . lang . System . nanoTime ( ) ; java ... | org . junit . Assert . assertEquals ( ( beforeStopTime - beforeStartTime ) , time , delta ) |
shouldParseIpAddressFamily ( ) { net . ripe . ipresource . IpResourceSet ipResourceSet = new net . ripe . ipresource . IpResourceSet ( ) ; ipResourceSet . add ( net . ripe . ipresource . IpResource . parse ( "10.5.4.0-10.5.15.255" ) ) ; ipResourceSet . add ( net . ripe . ipresource . IpResource . parse ( "128.5.0.4/32"... | org . junit . Assert . assertEquals ( map , map2 ) |
shouldNextTurn_whenSapperMove ( ) { int turnBeforeSapperMotion = board . getTurn ( ) ; board . sapperMoveTo ( Direction . UP ) ; int turnAfterSapperMotion = board . getTurn ( ) ; "<AssertPlaceHolder>" ; } getTurn ( ) { return turnCount ; } | org . junit . Assert . assertEquals ( turnBeforeSapperMotion , ( turnAfterSapperMotion - 1 ) ) |
test_readOffsetInfo ( ) { com . flipkart . storm . mysql . OffsetInfo offsetInfo = new com . flipkart . storm . mysql . OffsetInfo ( 12345 , "topName" , "topInstanceId" , "testDb" , 777 , "testBinLogFileName" ) ; zkClient . write ( zkBinLogStateConfig . getZkScnCommitPath ( ) , offsetInfo ) ; com . flipkart . storm . m... | org . junit . Assert . assertEquals ( offsetInfo , retrievedFromZk ) |
testIntegrate ( ) { final double [ ] points = new double [ ] { 0 , 1 , 2 , 3 , 4 , 5 } ; final double [ ] weights = new double [ ] { 1 , 1 , 1 , 1 , 1 , 1 } ; final org . hipparchus . analysis . integration . gauss . GaussIntegrator integrator = new org . hipparchus . analysis . integration . gauss . GaussIntegrator ( ... | org . junit . Assert . assertEquals ( ( ( points . length ) * val ) , s , 0.0 ) |
testConnector ( ) { com . cloudera . flume . conf . Context ctx = com . cloudera . flume . conf . LogicalNodeContext . testingContext ( ) ; com . cloudera . flume . core . EventSink snk = com . cloudera . flume . conf . FlumeBuilder . buildSink ( new com . cloudera . flume . conf . Context ( ) , "console" ) ; snk . ope... | org . junit . Assert . assertNull ( conn . getException ( ) ) |
testParseXMLTable ( ) { net . sourceforge . pmd . lang . plsql . ast . ASTInput input = parsePLSQL ( org . apache . commons . io . IOUtils . toString ( this . getClass ( ) . getResourceAsStream ( "XMLTable.pls" ) , StandardCharsets . UTF_8 ) ) ; "<AssertPlaceHolder>" ; } parsePLSQL ( net . sourceforge . pmd . lang . La... | org . junit . Assert . assertNotNull ( input ) |
sort_enum_with_guava ( ) { com . google . common . collect . Ordering < com . levelup . java . SortEnum . Fruit > byFruitAlphabetical = com . google . common . collect . Ordering . explicit ( com . levelup . java . SortEnum . Fruit . APPLE , com . levelup . java . SortEnum . Fruit . BANANAS , com . levelup . java . Sor... | org . junit . Assert . assertThat ( fruitAlphabetical , contains ( com . levelup . java . SortEnum . Fruit . APPLE , com . levelup . java . SortEnum . Fruit . BANANAS , com . levelup . java . SortEnum . Fruit . CHERRIES , com . levelup . java . SortEnum . Fruit . CHERRIES , com . levelup . java . SortEnum . Fruit . ORA... |
shouldGenerateAStringWithOnlyMinLength ( ) { int length = test ( 10 , 0 , 0 ) ; "<AssertPlaceHolder>" ; } test ( int , int , int ) { ch . nerdin . generators . testdata . framework . FieldProperty property = new ch . nerdin . generators . testdata . framework . FieldProperty ( ) ; if ( length != 0 ) { property . setMin... | org . junit . Assert . assertEquals ( 10 , length ) |
testRemoveUpdateListener ( ) { org . apache . servicecomb . config . archaius . sources . ConfigCenterConfigurationSourceImpl configCenterSource = new org . apache . servicecomb . config . archaius . sources . ConfigCenterConfigurationSourceImpl ( ) ; com . netflix . config . WatchedUpdateListener watchedUpdateListener... | org . junit . Assert . assertTrue ( configCenterSource . getCurrentListeners ( ) . isEmpty ( ) ) |
shouldHaveSameHashCodeGivenBothEmpty ( ) { uk . co . webamoeba . mockito . collections . util . OrderedSet < java . lang . Object > orderedSet1 = new uk . co . webamoeba . mockito . collections . util . OrderedSet < java . lang . Object > ( ) ; uk . co . webamoeba . mockito . collections . util . OrderedSet < java . la... | org . junit . Assert . assertEquals ( 0 , delta ) |
testStem3 ( ) { edu . nyu . jet . tipster . Document doc = prepare ( "There<sp>are<sp>swapped." ) ; edu . nyu . jet . lex . StemmerTest . stemmer . tagStem ( doc , doc . fullSpan ( ) ) ; java . util . Vector < edu . nyu . jet . tipster . Annotation > tokens = doc . annotationsOfType ( "token" ) ; java . util . List < j... | org . junit . Assert . assertEquals ( expected , actual ) |
test_a_b ( ) { org . antlr . v4 . runtime . atn . PredictionContext r = contextCache . join ( a ( false ) , b ( false ) ) ; System . out . println ( org . antlr . v4 . test . tool . TestGraphNodes . toDOTString ( r ) ) ; java . lang . String expecting = "digraph<sp>G<sp>{\n" + ( ( ( ( ( "rankdir=LR;\n" + "<sp>s0[shape=... | org . junit . Assert . assertEquals ( expecting , org . antlr . v4 . test . tool . TestGraphNodes . toDOTString ( r ) ) |
testUploadScreenshots ( ) { com . box . l10n . mojito . entity . Repository repository = testDataFactory . createRepository ( testIdWatcher ) ; com . box . l10n . mojito . entity . Locale localefrFR = localeService . findByBcp47Tag ( "fr-FR" ) ; com . box . l10n . mojito . rest . entity . Locale locale = new com . box ... | org . junit . Assert . assertEquals ( 2 , searchScreenshots . size ( ) ) |
test_inputs19 ( ) { java . lang . String matlab_function = "return_cell_array" ; int numout = 1 ; java . lang . Object [ ] argsT = new java . lang . Object [ 2 ] ; argsT [ 0 ] = 1 ; argsT [ 1 ] = 1 ; java . lang . Object [ ] output = null ; try { output = br . com . embraer . massif . communication . commandevaluation ... | org . junit . Assert . assertEquals ( 1 , ( ( double [ ] ) ( result [ 0 ] ) ) [ 0 ] , 0 ) |
testMath340 ( ) { org . apache . commons . math3 . fraction . BigFraction fractionA = new org . apache . commons . math3 . fraction . BigFraction ( 0.00131 ) ; org . apache . commons . math3 . fraction . BigFraction fractionB = new org . apache . commons . math3 . fraction . BigFraction ( 0.37 ) . reciprocal ( ) ; org ... | org . junit . Assert . assertEquals ( correctResult , errorResult ) |
doNotAssumeLatin1OnInvalidUtf8 ( ) { byte [ ] data = ( "我是一个不善于讲话的人," + ( "唯其不善于讲话,有思想表" + "达不出,有感情无法倾吐" ) ) . getBytes ( "GB18030" ) ; org . apache . shindig . gadgets . encoding . EncodingDetector . FallbackEncodingDetector detector = new org . apache . shindig . gadgets . encoding . EncodingDetector . FallbackEncodi... | org . junit . Assert . assertEquals ( "GB18030" , org . apache . shindig . gadgets . encoding . EncodingDetector . detectEncoding ( data , false , detector ) . name ( ) ) |
test_toIntegerArray ( ) { double [ ] doubles = new double [ 10 ] ; for ( int i = 0 ; i < 10 ; i ++ ) { doubles [ i ] = ( ( double ) ( i ) ) / 2.0F ; } int [ ] ints = org . eclipse . gef . geometry . internal . utils . PointListUtils . toIntegerArray ( doubles ) ; for ( int i = 0 ; i < 10 ; i ++ ) { "<AssertPlaceHolder>... | org . junit . Assert . assertTrue ( org . eclipse . gef . geometry . internal . utils . PrecisionUtils . equal ( ints [ i ] , ( ( int ) ( doubles [ i ] ) ) ) ) |
testGetAllAccounts ( ) { java . util . List < accounts . Account > accounts = accountManager . getAllAccounts ( ) ; "<AssertPlaceHolder>" ; } getAllAccounts ( ) { return accountRepository . getAllAccounts ( ) ; } | org . junit . Assert . assertNotNull ( accounts ) |
testIsRunmode ( ) { modes . add ( "publish" ) ; com . adobe . acs . commons . util . ModeUtil . configure ( slingSettings ) ; "<AssertPlaceHolder>" ; verify ( slingSettings ) . getRunModes ( ) ; verifyNoMoreInteractions ( slingSettings , context ) ; } isRunmode ( java . lang . String ) { return com . adobe . acs . comm... | org . junit . Assert . assertTrue ( com . adobe . acs . commons . util . ModeUtil . isRunmode ( "publish" ) ) |
testHasSameOriginServicePathNull ( ) { com . orange . cepheus . cep . model . Provider provider = new com . orange . cepheus . cep . model . Provider ( "http://sameUrl" ) ; provider . setServiceName ( "SN" ) ; provider . setServicePath ( "SP" ) ; com . orange . cepheus . cep . model . Provider pr = new com . orange . c... | org . junit . Assert . assertFalse ( checkTest ) |
testThatVerificationFailsIfTheProductDoesNotContainAStartTime ( ) { org . powermock . api . mockito . PowerMockito . when ( M_product . getStartTime ( ) ) . thenReturn ( null ) ; boolean result = _productValidator . isValid ( M_product ) ; "<AssertPlaceHolder>" ; verify ( S_logger , times ( 1 ) ) . info ( "Product<sp>s... | org . junit . Assert . assertEquals ( false , result ) |
correctXMLShouldGiveASpawnObject ( ) { org . linkedprocess . farm . SpawnVm spawn = new org . linkedprocess . farm . SpawnVm ( ) ; org . linkedprocess . farm . SpawnVm result = parse ( spawn . getChildElementXML ( ) ) ; "<AssertPlaceHolder>" ; } getChildElementXML ( ) { org . jdom . Element submitJobElement = new org .... | org . junit . Assert . assertNotNull ( result ) |
testGetIndices ( ) { java . util . UUID a = java . util . UUID . randomUUID ( ) ; java . util . UUID b = java . util . UUID . randomUUID ( ) ; java . util . UUID c = java . util . UUID . randomUUID ( ) ; java . util . UUID d = java . util . UUID . randomUUID ( ) ; writeSegment ( a ) ; writeSegment ( b ) ; tarFiles . ne... | org . junit . Assert . assertEquals ( expected , new java . util . HashSet ( tarFiles . getIndices ( ) . values ( ) ) ) |
testGetOperations ( ) { "<AssertPlaceHolder>" ; } getOperations ( ) { return hashOps . getOperations ( ) ; } | org . junit . Assert . assertEquals ( template , map . getOperations ( ) ) |
testInitConfig ( ) { com . streamsets . pipeline . api . Processor mLeapProcessor = new com . streamsets . pipeline . stage . processor . mleap . TestMLeapProcessorBuilder ( ) . modelPath ( com . streamsets . pipeline . stage . processor . mleap . TestMLeapProcessor . airbnbRFModelZipFilePath ) . inputFieldConfig ( "/r... | org . junit . Assert . assertEquals ( 0 , issues . size ( ) ) |
assertGetUnicodeStreamForColumnLabel ( ) { for ( java . util . Map . Entry < org . apache . shardingsphere . core . constant . DatabaseType , java . sql . ResultSet > each : resultSets . entrySet ( ) ) { if ( ( org . apache . shardingsphere . core . constant . DatabaseType . Oracle ) == ( each . getKey ( ) ) ) { contin... | org . junit . Assert . assertThat ( new java . lang . String ( b ) , org . hamcrest . CoreMatchers . is ( "1" ) ) |
testExtremeRangeInt ( ) { final int result = org . apache . commons . lang3 . RandomUtils . nextInt ( 0 , Integer . MAX_VALUE ) ; "<AssertPlaceHolder>" ; } nextInt ( int , int ) { org . apache . commons . lang3 . Validate . isTrue ( ( endExclusive >= startInclusive ) , "Start<sp>value<sp>must<sp>be<sp>smaller<sp>or<sp>... | org . junit . Assert . assertTrue ( ( ( result >= 0 ) && ( result < ( Integer . MAX_VALUE ) ) ) ) |
testGetLinksID_ListNull ( ) { java . util . List < org . matsim . api . core . v01 . Id < org . matsim . api . core . v01 . network . Link > > linkIds = org . matsim . core . network . NetworkUtils . getLinkIds ( ( ( java . util . List < org . matsim . api . core . v01 . network . Link > ) ( null ) ) ) ; "<AssertPlaceH... | org . junit . Assert . assertEquals ( 0 , linkIds . size ( ) ) |
testSeparatorInList2 ( ) { org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroup ( ) ; group . defineTemplate ( "test" , "names" , "<names:{n<sp>|<sp>case<sp><n>};<sp>separator=\",<sp>\">" ) ; org . stringtemplate . v4 . ST st = group . getInstanceOf ( "test" ) ; st . add ( "names" , "Ter"... | org . junit . Assert . assertEquals ( expected , result ) |
testBrokenVertex1 ( ) { com . orientechnologies . orient . graph . blueprints . OrientGraph g = new com . orientechnologies . orient . graph . blueprints . OrientGraph ( com . orientechnologies . orient . graph . blueprints . GraphTest . URL , "admin" , "admin" ) ; try { g . createVertexType ( "BrokenVertex1V" ) ; g . ... | org . junit . Assert . assertNotNull ( ( ( com . orientechnologies . orient . graph . blueprints . OrientVertex ) ( v1 ) ) . getRecord ( ) ) |
testBadConnectionString ( ) { java . util . List < com . streamsets . pipeline . stage . processor . jdbctee . JdbcFieldColumnParamMapping > fieldMappings = com . google . common . collect . ImmutableList . of ( new com . streamsets . pipeline . stage . processor . jdbctee . JdbcFieldColumnParamMapping ( "[2]" 7 , "[2]... | org . junit . Assert . assertEquals ( 1 , issues . size ( ) ) |
testSizeZeroOnLineWithIndentGetsNoOutput ( ) { org . stringtemplate . v4 . ST t = new org . stringtemplate . v4 . ST ( ( "begin\n" + ( ( ( "<sp><name>\n" + "\t<users>\n" ) + "\t<users>\n" ) + "end\n" ) ) ) ; java . lang . String expecting = ( ( "begin" + ( newline ) ) + "end" ) + ( newline ) ; java . lang . String resu... | org . junit . Assert . assertEquals ( expecting , result ) |
takingExclusiveLockMustInvalidateOptimisticLock ( ) { pageList . unlockExclusive ( pageRef ) ; long r = pageList . tryOptimisticReadLock ( pageRef ) ; pageList . tryExclusiveLock ( pageRef ) ; "<AssertPlaceHolder>" ; } validateReadLock ( long , long ) { org . neo4j . unsafe . impl . internal . dragons . UnsafeUtil . lo... | org . junit . Assert . assertFalse ( pageList . validateReadLock ( pageRef , r ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.