input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testValidAndEmptyIdModifiesRoot ( ) { try { testGroup . addMembers ( getTestUser ( ) . getID ( ) , "" ) ; } catch ( javax . jcr . nodetype . ConstraintViolationException e ) { } "<AssertPlaceHolder>" ; } hasPendingChanges ( ) { return base . hasPendingChanges ( ) ; } | org . junit . Assert . assertFalse ( root . hasPendingChanges ( ) ) |
testRemoveCStringReducesBuffer ( ) { buffer = org . smpp . util . ByteBufferTest . bufferOf ( org . smpp . util . ByteBufferTest . A , org . smpp . util . ByteBufferTest . B , org . smpp . util . ByteBufferTest . NULL , org . smpp . util . ByteBufferTest . C , org . smpp . util . ByteBufferTest . NULL ) ; buffer . remo... | org . junit . Assert . assertEquals ( 2 , buffer . length ( ) ) |
testAppendFilename ( ) { com . nextdoor . bender . aws . TestContext context = new com . nextdoor . bender . aws . TestContext ( ) ; context . setAwsRequestId ( "req_id" ) ; com . nextdoor . bender . handler . s3 . S3InternalEvent ievent = new com . nextdoor . bender . handler . s3 . S3InternalEvent ( "foo" , new com .... | org . junit . Assert . assertEquals ( expected , ievent . getPartitions ( ) ) |
testHelpCommand ( ) { int rc = run ( "help" , "test" ) ; verify ( console ) . info ( "\nUsage:<sp>{}<sp>[general<sp>options]<sp>{}<sp>{}<sp>[command<sp>options]" , new java . lang . Object [ ] { Main . DEFAULT_PROGRAM_NAME , "test" , "<test<sp>dataset<sp>names>" } ) ; verify ( console ) . info ( contains ( "Description... | org . junit . Assert . assertEquals ( 0 , rc ) |
testMapDouble ( ) { java . util . Map < java . lang . String , java . lang . Object > aMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , com . amazonaws . services . dynamodbv2 . model . AttributeValue > exMap = new java . util . HashMap < j... | org . junit . Assert . assertEquals ( expected , actual ) |
calculateEmptyList ( ) { cucumber . runtime . formatter . UsageFormatter . AverageUsageStatisticStrategy averageUsageStatisticStrategy = new cucumber . runtime . formatter . UsageFormatter . AverageUsageStatisticStrategy ( ) ; java . lang . Long result = averageUsageStatisticStrategy . calculate ( java . util . Collect... | org . junit . Assert . assertEquals ( result , java . lang . Long . valueOf ( 0 ) ) |
testIsLastSubscription_ZeroSubscriptions ( ) { runTX ( new java . util . concurrent . Callable < org . oscm . domobjects . TechnicalProduct > ( ) { @ org . oscm . domobjects . Override public org . oscm . domobjects . TechnicalProduct call ( ) throws org . oscm . domobjects . Exception { supplier = org . oscm . test . ... | org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 0 ) , result ) |
defaultVersionInRefTest ( ) { com . redhat . lightblue . metadata . EntityMetadata md = getMd ( "composite/A_def.json" ) ; com . redhat . lightblue . metadata . CompositeMetadata a = com . redhat . lightblue . metadata . CompositeMetadata . buildCompositeMetadata ( md , new com . redhat . lightblue . metadata . Composi... | org . junit . Assert . assertNotNull ( ref ) |
testGetStageCreatesStage ( ) { try { final java . lang . reflect . Field field = net . sf . latexdraw . instrument . ExceptionsManager . class . getDeclaredField ( "stageEx" ) ; field . setAccessible ( true ) ; field . set ( manager , null ) ; } catch ( java . lang . IllegalAccessException | java . lang . NoSuchFieldEx... | org . junit . Assert . assertNotNull ( manager . getStageEx ( ) ) |
testGetHttpReasonPhrase ( ) { javax . ws . rs . core . MediaType contentType = new javax . ws . rs . core . MediaType ( ) ; byte [ ] content = new byte [ ] { 48 , 49 } ; com . intel . mtwilson . ApiResponse response = new com . intel . mtwilson . ApiResponse ( 404 , "Not<sp>Found" , contentType , content ) ; com . inte... | org . junit . Assert . assertEquals ( "Not<sp>Found" , apiexception . getHttpReasonPhrase ( ) ) |
testDescribeRegions ( ) { try { com . fit2cloud . aliyun . Response response = client . describeRegions ( ) ; System . out . println ( ( "testdDescribeRegions<sp>::<sp>" + ( new com . google . gson . Gson ( ) . toJson ( response ) ) ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTra... | org . junit . Assert . assertTrue ( true ) |
testToArray ( ) { java . lang . Integer [ ] collect = java . util . stream . Stream . of ( 1 , 2 , 3 ) . collect ( io . datakernel . util . CollectorsEx . toArray ( io . datakernel . util . Integer . class ) ) ; "<AssertPlaceHolder>" ; } toArray ( java . lang . Class ) { return java . util . stream . Collector . of ( A... | org . junit . Assert . assertArrayEquals ( new java . lang . Integer [ ] { 1 , 2 , 3 } , collect ) |
testExitThrowsException ( ) { brown . tracingplane . baggageprotocol . BaggageReader reader = makeBaggage ( ) ; "<AssertPlaceHolder>" ; exception . expect ( brown . tracingplane . baggageprotocol . BaggageLayerException . BaggageLayerRuntimeException . class ) ; reader . exit ( ) ; } hasData ( ) { return ( ( nextAtom )... | org . junit . Assert . assertTrue ( reader . hasData ( ) ) |
testGetAllBooksLike ( ) { java . util . List < org . integrallis . bookstore . domain . Book > books = bookDAO . findByPropertyLike ( org . integrallis . bookstore . dao . BookDAO . TITLE , "Beginning" ) ; for ( java . util . Iterator < org . integrallis . bookstore . domain . Book > iterator = books . iterator ( ) ; i... | org . junit . Assert . assertTrue ( book . getTitle ( ) . contains ( "Beginning" ) ) |
testRepackAfterTextSizeDetermination ( ) { grid . setHeaderVisible ( true ) ; column . setText ( "foo" ) ; column . pack ( ) ; int packedWidth = column . getWidth ( ) ; markTemporaryResize ( true ) ; grid . setSize ( 1000 , 1000 ) ; column . setText ( "foo<sp>bar" ) ; markTemporaryResize ( false ) ; grid . setSize ( 10... | org . junit . Assert . assertTrue ( ( repackedWidth > packedWidth ) ) |
testSequentialMismatchUnequivalent ( ) { final org . openbel . framework . common . model . Namespace hgnc = new org . openbel . framework . common . model . Namespace ( "HGNC" , "http://resource.belframework.org/belframework/1.0/namespace/hgnc-approved-symbols.belns" ) ; final org . openbel . framework . common . mode... | org . junit . Assert . assertThat ( term1 . equals ( term2 ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testContinueAfterStartAndNotSameType ( ) { final java . lang . String outcome = opennlp . tools . namefind . NameFinderSequenceValidatorTest . CONTINUE_B ; java . lang . String [ ] inputSequence = new java . lang . String [ ] { "PersonA" , "LocationA" , "something" } ; java . lang . String [ ] outcomesSequence = new ja... | org . junit . Assert . assertFalse ( opennlp . tools . namefind . NameFinderSequenceValidatorTest . validator . validSequence ( 1 , inputSequence , outcomesSequence , outcome ) ) |
testNotifyUserString ( ) { world . bentobox . bentobox . api . user . User user = mock ( world . bentobox . bentobox . api . user . User . class ) ; java . lang . String message = "a<sp>message" ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( user ) . sendRawMessage ( message ) ; } notify ( java . lang . S... | org . junit . Assert . assertTrue ( n . notify ( user , message ) ) |
test_shouldNotMountVolumeOnApplicationVolumeNameEmpty ( ) { createApplication ( ) ; try { org . springframework . shell . core . CommandResult result = mountVolume ( "/cloudunit/" , "" ) ; "<AssertPlaceHolder>" ; } finally { removeApplication ( ) ; } } isFailedCommand ( ) { return new fr . treeptik . cloudunit . cli . ... | org . junit . Assert . assertThat ( result , isFailedCommand ( ) ) |
testSearchNotExistingSuperiorNoReferralAncestor ( ) { javax . naming . directory . Attributes attrs = new javax . naming . directory . BasicAttributes ( "ObjectClass" , "top" , true ) ; try { MNNCtx . search ( "cn=nobody" , attrs ) ; org . junit . Assert . fail ( ) ; } catch ( javax . naming . NameNotFoundException nnf... | org . junit . Assert . assertTrue ( true ) |
testUnnestList ( ) { com . dremio . dac . model . job . JobDataFragment data = testConvert ( "flatten(b)<sp>as<sp>foo" , new com . dremio . dac . proto . model . dataset . FieldUnnestList ( ) , "b" , "cp.\"json/nested.json\"" ) ; "<AssertPlaceHolder>" ; } getReturnedRowCount ( ) { return recordBatches . getSize ( ) ; } | org . junit . Assert . assertEquals ( 6 , data . getReturnedRowCount ( ) ) |
testQuery_14_10_16 ( ) { javax . jdo . PersistenceManager pm = org . zoodb . test . testutil . TestTools . openPM ( ) ; pm . currentTransaction ( ) . begin ( ) ; javax . jdo . Query q = pm . newQuery ( org . zoodb . test . jdo . test_071 . Employee . class , "salary<sp>><sp>sal" ) ; q . declareParameters ( "Float<sp>sa... | org . junit . Assert . assertNotNull ( e ) |
cacheLoaderClosesClassLoaders ( ) { java . lang . ClassLoader cl ; try ( com . facebook . buck . util . ClassLoaderCache clc = new com . facebook . buck . util . ClassLoaderCache ( ) ) { java . lang . ClassLoader dummyParent = java . lang . ClassLoader . getSystemClassLoader ( ) ; com . google . common . collect . Immu... | org . junit . Assert . assertNull ( cl . getResource ( "baz" ) ) |
test_validateCreateWBUri_wrongUriFirstCharacter ( ) { errorsContainer . put ( "uri" , WPBErrors . ERROR_URI_START_CHAR ) ; wburi . setHttpOperation ( "GET" ) ; wburi . setUri ( "test" ) ; wburi . setResourceType ( WPBUri . RESOURCE_TYPE_FILE ) ; wburi . setResourceExternalKey ( "123" ) ; wburi . setEnabled ( 1 ) ; java... | org . junit . Assert . assertTrue ( errorsContainer . equals ( errors ) ) |
trimLabelsNanoseconds2 ( ) { java . util . List < java . lang . String > input = java . util . Arrays . asList ( "2014/11/26<sp>09:01:00.000000000" , "2014/11/26<sp>09:02:00.000200000" , "2014/11/26<sp>09:03:00.000400000" , "2014/11/26<sp>09:04:00.000600000" , "2014/11/26<sp>09:05:00.000800000" ) ; java . util . List <... | org . junit . Assert . assertThat ( found , equalTo ( expected ) ) |
initModelData_RenderOrgSectionNoAdmin ( ) { doReturn ( Boolean . FALSE ) . when ( ctrl . identitySvc ) . isCallerOrganizationAdmin ( ) ; ctrl . initModelData ( profile ) ; org . oscm . ui . profile . EditProfileModel model = ctrl . model ; "<AssertPlaceHolder>" ; } isRenderOrganizationSection ( ) { return renderOrganiz... | org . junit . Assert . assertFalse ( model . isRenderOrganizationSection ( ) ) |
testDeleteCommand ( ) { final org . kie . workbench . common . widgets . metadata . client . TestDocument document = createTestDocument ( ) ; final org . uberfire . backend . vfs . ObservablePath path = document . getLatestPath ( ) ; editor . setupMenuBar ( ) ; registerDocument ( document ) ; final org . mockito . Argu... | org . junit . Assert . assertNotNull ( deleteCommand ) |
getEventsAcceptsNullFilters ( ) { org . phenotips . security . audit . AuditEvent template = new org . phenotips . security . audit . AuditEvent ( null , null , null , null , null , null ) ; when ( this . store . getEvents ( template , null , null , 0 , 0 ) ) . thenReturn ( this . events ) ; when ( this . auth . hasAcc... | org . junit . Assert . assertSame ( this . events , result ) |
shouldCountCustomMethodWithNearBox ( ) { java . lang . String documentId = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity = new org . springframework . data . elasticsearch . entities . SampleEntity ( ) ; sampleEntity . setId ( documentId ) ; sampleEntity . set... | org . junit . Assert . assertThat ( count , is ( equalTo ( 1L ) ) ) |
testEquals ( ) { org . jfree . data . time . Day day1 = new org . jfree . data . time . Day ( 29 , org . jfree . chart . date . MonthConstants . MARCH , 2002 ) ; org . jfree . data . time . Hour hour1 = new org . jfree . data . time . Hour ( 15 , day1 ) ; org . jfree . data . time . Minute minute1 = new org . jfree . d... | org . junit . Assert . assertEquals ( milli1 , milli2 ) |
testComputeCacheKeyWithDifferentPostAgg ( ) { final org . apache . druid . query . topn . TopNQuery query1 = new org . apache . druid . query . topn . TopNQuery ( new org . apache . druid . query . TableDataSource ( "dummy" ) , org . apache . druid . segment . VirtualColumns . EMPTY , new org . apache . druid . query .... | org . junit . Assert . assertFalse ( java . util . Arrays . equals ( strategy1 . computeCacheKey ( query1 ) , strategy2 . computeCacheKey ( query2 ) ) ) |
similarity ( ) { System . out . println ( "simpleLS" ) ; org . aksw . limes . core . io . ls . LinkSpecification ls = new org . aksw . limes . core . io . ls . LinkSpecification ( "tmp_during(x.beginsAtDateTime|endsAtDateTime,y.b|e)" , 1.0 ) ; org . aksw . limes . core . execution . planning . planner . DynamicPlanner ... | org . junit . Assert . assertTrue ( m . equals ( m2 ) ) |
testOverrun ( ) { com . streamsets . pipeline . api . ext . io . OverrunReader reader = new com . streamsets . pipeline . api . ext . io . OverrunReader ( new java . io . StringReader ( createTextLines ( 1000 , 20 , 5000 ) ) , ( 2 * 1000 ) , true , false ) ; int lines = 0 ; try ( com . streamsets . pipeline . lib . par... | org . junit . Assert . assertEquals ( 20 , lines ) |
removeIf ( ) { final int nearlyTheSameTime = 50 ; holder . hold ( alertEntity ( ) ) ; holder . removeIf ( ( alertEntity ) -> ( ( java . lang . System . currentTimeMillis ( ) ) - ( alertEntity . getDate ( ) . getTime ( ) ) ) <= nearlyTheSameTime ) ; "<AssertPlaceHolder>" ; } hasAlerts ( ) { } | org . junit . Assert . assertFalse ( holder . hasAlerts ( ) ) |
testFindServiceById ( ) { org . hyperic . hq . product . ServiceTypeInfo sinfo = new org . hyperic . hq . product . ServiceTypeInfo ( ) ; sinfo . setDescription ( "Test<sp>ServiceType<sp>Desc" ) ; sinfo . setInternal ( false ) ; sinfo . setName ( "Test<sp>ServiceType<sp>Name" ) ; org . hyperic . hq . appdef . server . ... | org . junit . Assert . assertEquals ( service , serviceManager . findServiceById ( service . getId ( ) ) ) |
testParseSuccess ( ) { actions = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "type" , "aaa" ) ; put ( "edge_node" , "node_01" ) ; } } ; target = new org . o3project . odenos . core . component . network . flow . query . OFPFlowActionCopyTtlInQuery ( actions ) ; "<AssertPlaceH... | org . junit . Assert . assertThat ( target . parse ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testGetDrugGroupByName ( ) { java . lang . String name = "TestDrugGroup1" ; java . lang . String result = dao . getDrugGroupByName ( name ) . get ( 0 ) . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( name , result ) |
whenSettingOneDimValue_valueMustBeCorrect ( ) { com . graphhopper . jsprit . core . problem . Capacity . Builder capBuilder = Capacity . Builder . newInstance ( ) ; capBuilder . addDimension ( 0 , 4 ) ; com . graphhopper . jsprit . core . problem . Capacity cap = capBuilder . build ( ) ; "<AssertPlaceHolder>" ; } get (... | org . junit . Assert . assertEquals ( 4 , cap . get ( 0 ) ) |
testCreateSingle ( ) { cityService . createCity ( ) ; java . util . List < net . neoremind . fountain . test . po . City > cities = cityService . getAll ( ) ; "<AssertPlaceHolder>" ; } getAll ( ) { return cityDao . getAll ( ) ; } | org . junit . Assert . assertThat ( cities . size ( ) , org . hamcrest . Matchers . is ( 1 ) ) |
testIsNotEmptyWithEmptyMap ( ) { final java . util . Map < java . lang . Object , java . lang . Object > map = new java . util . HashMap ( ) ; "<AssertPlaceHolder>" ; } isNotEmpty ( java . util . Map ) { return ! ( org . apache . commons . collections4 . MapUtils . isEmpty ( map ) ) ; } | org . junit . Assert . assertEquals ( false , org . apache . commons . collections4 . MapUtils . isNotEmpty ( map ) ) |
testLog10Power ( ) { double [ ] epsilon = new double [ ] { 3.0E-16 , 3.0E-16 , 9.0E-16 , 6.0E-15 , 6.0E-14 } ; 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 ... | org . junit . Assert . assertEquals ( 0 , zero . getPartialDerivative ( n ) , epsilon [ n ] ) |
testMultiLayerIndex ( ) { de . vandermeer . svg2vector . applications . is . Svg2Vector_IS app = new de . vandermeer . svg2vector . applications . is . Svg2Vector_IS ( ) ; java . lang . String [ ] args = org . apache . commons . lang3 . ArrayUtils . addAll ( de . vandermeer . svg2vector . applications . is . Test_Svg2V... | org . junit . Assert . assertEquals ( 0 , app . executeApplication ( args ) ) |
testReverse ( ) { System . out . println ( "Testing<sp>Reverse..." ) ; edu . cmu . sphinx . fst . Fst fst = edu . cmu . sphinx . fst . openfst . Convert . importFst ( "src/test/edu/cmu/sphinx/fst/data/tests/algorithms/reverse/A" , new edu . cmu . sphinx . fst . semiring . TropicalSemiring ( ) ) ; edu . cmu . sphinx . f... | org . junit . Assert . assertTrue ( fstB . equals ( fstReversed ) ) |
testInitialAttach ( ) { java . util . concurrent . atomic . AtomicBoolean initialAttach = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; com . vaadin . flow . component . ComponentTest . TestComponent c = new com . vaadin . flow . component . ComponentTest . TestComponent ( ) ; c . addAttachListener ... | org . junit . Assert . assertTrue ( initialAttach . get ( ) ) |
test_LocalDateTime_adjustToSymmetry454Date ( ) { org . threeten . extra . chrono . Symmetry454Date sym454 = org . threeten . extra . chrono . Symmetry454Date . of ( 2012 , 7 , 19 ) ; java . time . LocalDateTime test = LocalDateTime . MIN . with ( sym454 ) ; "<AssertPlaceHolder>" ; } with ( java . time . temporal . Temp... | org . junit . Assert . assertEquals ( java . time . LocalDateTime . of ( 2012 , 7 , 20 , 0 , 0 ) , test ) |
testBasicArrowFunctionsWork ( ) { java . lang . Object result = manifold . js . demo . ArrowFunctionClass . arrowFilterStatement ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 3 , result ) |
shouldNotBeValidIfHasWarningFacesMessage ( ) { java . util . List < javax . faces . component . UIComponent > components = createComponentWithFacesMessage ( FacesMessage . SEVERITY_WARN ) ; org . springframework . springfaces . template . ui . ComponentInfo info = new org . springframework . springfaces . template . ui... | org . junit . Assert . assertThat ( info . isValid ( ) , org . hamcrest . Matchers . is ( false ) ) |
testGetTrustBundlesByDomain_unknownDomain_assertException ( ) { boolean exceptionOccured = false ; try { tbDao . getTrustBundlesByDomain ( 1234 ) ; } catch ( org . nhindirect . config . store . ConfigurationStoreException e ) { exceptionOccured = true ; } "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( exceptionOccured ) |
testString ( ) { java . lang . String result = executeBackAndForth ( "360buy.com" , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( getKey ( ) ) + "=" ) + ( getValue ( ) ) ; } | org . junit . Assert . assertEquals ( "360buy.com" , result . toString ( ) ) |
testMissingFile ( ) { org . kitesdk . data . spi . AbstractDatasetReader < java . lang . String > reader = new org . kitesdk . data . spi . filesystem . FileSystemDatasetReader < java . lang . String > ( fileSystem , new org . apache . hadoop . fs . Path ( "/tmp/does-not-exist.avro" ) , STRING_SCHEMA , java . lang . St... | org . junit . Assert . assertNotNull ( reader ) |
unrecognized_attr ( ) { final java . util . Map < com . groupon . lex . metrics . MetricName , com . groupon . lex . metrics . MetricValue > result = com . groupon . lex . metrics . AttributeConverter . resolve_property ( com . groupon . lex . metrics . AttributeConverterTest . ROOT , new java . lang . Object ( ) ) . c... | org . junit . Assert . assertTrue ( result . isEmpty ( ) ) |
testRangeFunc ( ) { java . util . List < org . decaywood . entity . Stock > stocks = mapperTest . TestCaseGenerator . generateStocks ( ) ; org . decaywood . mapper . stockFirst . StockToStockWithShareHolderTrendMapper mapper = new org . decaywood . mapper . stockFirst . StockToStockWithShareHolderTrendMapper ( ) ; int ... | org . junit . Assert . assertTrue ( ( count2 < count1 ) ) |
txn_readpromote_promote_commit ( ) { unit . begin ( TxnType . READ_PROMOTE ) ; boolean b = unit . promote ( ) ; "<AssertPlaceHolder>" ; unit . commit ( ) ; unit . end ( ) ; checkClear ( ) ; } promote ( ) { if ( bpTree . getNodeManager ( ) . isWritable ( this . getId ( ) ) ) return false ; boolean promoteInPlace = bpTre... | org . junit . Assert . assertTrue ( b ) |
parse_doesNotFailWithManyEmptyObjects ( ) { com . eclipsesource . json . JsonArray array = new com . eclipsesource . json . JsonArray ( ) ; for ( int i = 0 ; i < 1001 ; i ++ ) { array . add ( new com . eclipsesource . json . JsonObject ( ) ) ; } final java . lang . String input = array . toString ( ) ; com . eclipsesou... | org . junit . Assert . assertTrue ( result . isArray ( ) ) |
testForbiddenReplacementWrongPriorities ( ) { "<AssertPlaceHolder>" ; } getReplacedField ( ) { org . nuxeo . ecm . core . schema . types . SchemaImpl nuxeo = new org . nuxeo . ecm . core . schema . types . SchemaImpl ( "testSchema" , new org . nuxeo . ecm . core . schema . Namespace ( "hhtp://test.com/schema/test" , "t... | org . junit . Assert . assertNull ( getReplacedField ( ) ) |
override_marshaller ( ) { biweekly . ICalendar ical = new biweekly . ICalendar ( ) ; ical . addProperty ( new biweekly . property . Version ( "2.0" ) ) ; ical . setProductId ( "prodid" ) ; java . io . StringWriter sw = new java . io . StringWriter ( ) ; biweekly . io . json . JCalWriter writer = new biweekly . io . jso... | org . junit . Assert . assertEquals ( expected , actual ) |
testHasNodeFiltering ( ) { 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 . google . common .... | org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . hasSize ( 0 ) ) |
addNull ( ) { "<AssertPlaceHolder>" ; } add ( com . amazonaws . metrics . MetricType ) { return type == null ? false : com . amazonaws . metrics . AwsSdkMetrics . REGISTRY . addMetricType ( type ) ; } | org . junit . Assert . assertFalse ( com . amazonaws . metrics . AwsSdkMetrics . add ( null ) ) |
shouldSucceedIfAPermissionCheckIsDoneWithoutContextAndPermissionIsGrantedToRoleOnSpecificContext ( ) { ch . puzzle . itc . mobiliar . business . security . control . ResourceTypeEntity resourceType = new ch . puzzle . itc . mobiliar . business . integration . entity . util . ResourceTypeEntityBuilder ( ) . id ( 7 ) . b... | org . junit . Assert . assertTrue ( result ) |
testDefaultSort03 ( ) { java . util . LinkedHashSet < org . apache . tomcat . util . net . jsse . openssl . Cipher > input = new java . util . LinkedHashSet ( ) ; input . add ( Cipher . TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 ) ; input . add ( Cipher . TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 ) ; java . util . Linked... | org . junit . Assert . assertEquals ( expected . toString ( ) , result . toString ( ) ) |
AccessInstanceVariableIndirect_MethodVar ( ) { java . lang . String fromClass = "Domain.Indirect.ViolatingFrom.AccessInstanceVariableIndirect_MethodVar" ; java . lang . String toClass = "Domain.Indirect.IndirectTo.ServiceOne" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList <... | org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , true ) ) |
flatMapPrecedence ( ) { com . jnape . palatable . lambda . adt . hlist . Tuple3 < java . lang . String , java . lang . Integer , java . lang . Integer > a = com . jnape . palatable . lambda . adt . hlist . HList . tuple ( "foo" , 1 , 2 ) ; java . util . function . Function < java . lang . Integer , com . jnape . palata... | org . junit . Assert . assertEquals ( com . jnape . palatable . lambda . adt . hlist . HList . tuple ( "foo" , 1 , 3 ) , a . flatMap ( b ) ) |
testGetViaAlternateCase ( ) { final io . swagger . client . ApiClient webClientUser2 = getWebClient ( io . dockstore . client . cli . USER_2_USERNAME ) ; io . swagger . client . api . OrganizationsApi organisationsApiUser2 = new io . swagger . client . api . OrganizationsApi ( webClientUser2 ) ; io . swagger . client .... | org . junit . Assert . assertEquals ( organisationByName . getId ( ) , createdOrg . getId ( ) ) |
Should_getConstructedAndStoreAttributes ( ) { info . smart_tools . smartactors . email . email_actor . exception . SendFailureException exception = new info . smart_tools . smartactors . email . email_actor . exception . SendFailureException ( ) ; exception . addEmail ( "some_email" ) ; "<AssertPlaceHolder>" ; } getEma... | org . junit . Assert . assertEquals ( exception . getEmails ( ) , java . util . Collections . singletonList ( "some_email" ) ) |
testMqttClientIsMemoized ( ) { org . powermock . api . mockito . PowerMockito . mockStatic ( org . pentaho . di . trans . step . mqtt . MQTTClientBuilder . class ) ; org . pentaho . di . trans . step . mqtt . MQTTClientBuilder clientBuilder = spy ( org . pentaho . di . trans . step . mqtt . MQTTClientBuilder . class ) ... | org . junit . Assert . assertEquals ( step . client . get ( ) , step . client . get ( ) ) |
testDetermineConstructor ( ) { java . lang . reflect . Constructor < java . lang . Integer > constructor = findConstructor ( at . ac . tuwien . infosys . jcloudscale . test . unit . Integer . class , new java . lang . Class < ? > [ ] { null } ) ; "<AssertPlaceHolder>" ; } findConstructor ( java . lang . Class , at . ac... | org . junit . Assert . assertEquals ( at . ac . tuwien . infosys . jcloudscale . test . unit . Integer . class . getDeclaredConstructor ( java . lang . String . class ) , constructor ) |
testSetProvider ( ) { final java . lang . String name = "success-test" ; org . eclipse . microprofile . health . spi . HealthCheckResponseProvider provider = new com . ibm . ws . microprofile . health . spi . impl . HealthCheckResponseProviderImpl ( ) ; org . eclipse . microprofile . health . HealthCheckResponse . setR... | org . junit . Assert . assertEquals ( name , testName ) |
testHBaseConfigurationClassLoaderSetToAppContextClassLoader ( ) { java . lang . ClassLoader expectedClassLoader = org . apache . camel . component . hbase . HBaseComponentTest . class . getClassLoader ( ) ; org . apache . camel . CamelContext camelContext = new org . apache . camel . impl . DefaultCamelContext ( ) ; ca... | org . junit . Assert . assertSame ( expectedClassLoader , actualClassLoader ) |
shouldInstrumentIgnoringBranches ( ) { java . lang . String source = ( ( CommentsHandler . EXCL_BR_START ) + "\nvar<sp>x<sp>=<sp>x<sp>||<sp>7;" ) + ( CommentsHandler . EXCL_BR_STOP ) ; java . lang . String instrumentedSource = sourceProcessor . instrumentSource ( source ) ; java . lang . String expectedSource = "_$jsco... | org . junit . Assert . assertEquals ( expectedSource , instrumentedSource ) |
asyncTransaction ( ) { org . kurento . client . Transaction tx = kurentoClient . beginTransaction ( ) ; org . kurento . client . MediaPipeline pipeline = kurentoClient . createMediaPipeline ( ) ; org . kurento . client . PlayerEndpoint player = new org . kurento . client . PlayerEndpoint . Builder ( pipeline , ( ( "htt... | org . junit . Assert . assertThat ( pipeline . isCommited ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
getZigBeeLinkKey ( ) { com . zsmartsystems . zigbee . transport . ZigBeeTransportTransmit transport = org . mockito . Mockito . mock ( com . zsmartsystems . zigbee . transport . ZigBeeTransportTransmit . class ) ; com . zsmartsystems . zigbee . ZigBeeNetworkManager manager = new com . zsmartsystems . zigbee . ZigBeeNet... | org . junit . Assert . assertEquals ( key , manager . getZigBeeLinkKey ( ) ) |
testPopulate ( ) { D dto = ( ( D ) ( this . translator . populate ( this . source , this . dest ) ) ) ; "<AssertPlaceHolder>" ; this . verifyOutput ( this . source , this . dest , false ) ; } populate ( org . candlepin . model . Pool , org . candlepin . model . ProductCurator ) { if ( source == null ) { throw new java ... | org . junit . Assert . assertSame ( dto , this . dest ) |
whenFileIsNotFreshlyAdded_isNewAttributeShouldBeFalse ( ) { initGitFileSystem ( "/some_file.txt" ) ; "<AssertPlaceHolder>" ; } isNew ( java . lang . String ) { return ( ( boolean ) ( readAttribute ( path , com . beijunyi . parallelgit . filesystem . io . IS_NEW ) ) ) ; } | org . junit . Assert . assertFalse ( isNew ( "/some_file.txt" ) ) |
testDeleteDrugInfo ( ) { org . raxa . module . raxacore . DrugInfo drugInfo = new org . raxa . module . raxacore . DrugInfo ( ) ; drugInfo . setId ( 2 ) ; org . openmrs . Drug drug = new org . openmrs . Drug ( ) ; drug . setId ( 5 ) ; drug . setDrugId ( 5 ) ; drugInfo . setDrugId ( 5 ) ; drugInfo . setDrug ( drug ) ; d... | org . junit . Assert . assertEquals ( null , result ) |
testConvertWithNoRelations ( ) { java . lang . String name = "name" ; java . lang . String abbrName = "abbr<sp>name" ; java . util . Date begDate = new java . util . Date ( ) ; java . util . Date endDate = new java . util . Date ( ) ; org . lnu . is . domain . department . Department department = new org . lnu . is . d... | org . junit . Assert . assertEquals ( expected , actual ) |
testRefreshNone ( ) { test ( "refresh<sp>table<sp>metadata<sp>columns<sp>none<sp>dfs.`%s`" , org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_1 ) ; checkForMetadataFile ( org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_1 ) ; java . lang . String... | org . junit . Assert . assertEquals ( expectedRowCount , actualRowCount ) |
testIterator ( ) { org . pb . x12 . Segment s = new org . pb . x12 . Segment ( new org . pb . x12 . Context ( '~' , '*' , ':' ) ) ; s . addElements ( "ISA" , "ISA01" , "ISA02" , "ISA03" ) ; "<AssertPlaceHolder>" ; } iterator ( ) { return segments . iterator ( ) ; } | org . junit . Assert . assertNotNull ( s . iterator ( ) ) |
testBug1183 ( ) { org . eclipse . ceylon . common . tool . ToolModel < org . eclipse . ceylon . compiler . CeylonCompileTool > model = pluginLoader . loadToolModel ( "compile" ) ; "<AssertPlaceHolder>" ; org . eclipse . ceylon . compiler . CeylonCompileTool tool = pluginFactory . bindArguments ( model , getMainTool ( )... | org . junit . Assert . assertNotNull ( model ) |
testDateFunctionInOrder ( ) { java . lang . String startDateString = "Tue<sp>Apr<sp>8<sp>10:30:57<sp>GMT<sp>2014" ; java . lang . String endDateString = "Wed<sp>Apr<sp>9<sp>10:30:57<sp>GMT<sp>2014" ; java . lang . String UPTIME = "Tue<sp>Apr<sp>8<sp>10:30:57<sp>GMT<sp>2014" 3 ; java . lang . String dateFormat = "%a<sp>... | org . junit . Assert . assertEquals ( want , sql ) |
testHonorSystemProxyIsFalseByDefault ( ) { "<AssertPlaceHolder>" ; } honorSystemProxy ( ) { return honorSystemProxy ; } | org . junit . Assert . assertFalse ( configuration . honorSystemProxy ( ) ) |
serializationRoundTripWithJackson ( ) { com . fasterxml . jackson . databind . ObjectMapper objectMapper = new com . fasterxml . jackson . databind . ObjectMapper ( ) ; objectMapper . disable ( com . fasterxml . jackson . databind . DeserializationFeature . UNWRAP_ROOT_VALUE ) ; objectMapper . disable ( com . fasterxml... | org . junit . Assert . assertEquals ( input , output ) |
testLoopedReplication ( ) { org . apache . hadoop . hbase . replication . TestMasterReplication . LOG . info ( "testLoopedReplication" ) ; startMiniClusters ( 1 ) ; createTableOnClusters ( table ) ; addPeer ( "1" , 0 , 0 ) ; java . lang . Thread . sleep ( org . apache . hadoop . hbase . replication . TestMasterReplicat... | org . junit . Assert . assertEquals ( 0 , listChildrenNoWatch . size ( ) ) |
testCacheFetchOffsetAndLimit ( ) { org . apache . cayenne . map . EntityResolver resolver = runtime . getDataDomain ( ) . getEntityResolver ( ) ; org . apache . cayenne . query . ProcedureQuery q1 = new org . apache . cayenne . query . ProcedureQuery ( "ABC" , org . apache . cayenne . testdo . testmap . Artist . class ... | org . junit . Assert . assertEquals ( q1 . getMetaData ( resolver ) . getCacheKey ( ) , q2 . getMetaData ( resolver ) . getCacheKey ( ) ) |
testSetBoundResetsOffset ( ) { builder . setLimit ( 25 , ( - 1 ) ) ; builder . setLimit ( v , ( - 1 ) ) ; "<AssertPlaceHolder>" ; } getOffset ( ) { return offset ; } | org . junit . Assert . assertEquals ( 0 , builder . getOffset ( ) ) |
testObtainsClientIpFrom_WL_Proxy_Client_IP ( ) { request . setHeader ( "WL-Proxy-Client-IP" , "12.34.56.78" ) ; com . eclipsesource . tabris . tracking . TrackingInfo info = com . eclipsesource . tabris . tracking . internal . TrackingInfoFactory . createInfo ( ui . getDisplay ( ) ) ; java . lang . String ip = info . g... | org . junit . Assert . assertEquals ( "12.34.56.78" , ip ) |
testDeleteNetwork_Null ( ) { org . easymock . EasyMock . expect ( computeRpcMock . deleteNetwork ( com . google . cloud . compute . deprecated . ComputeImplTest . NETWORK_ID . getNetwork ( ) , com . google . cloud . compute . deprecated . ComputeImplTest . EMPTY_RPC_OPTIONS ) ) . andReturn ( null ) ; org . easymock . E... | org . junit . Assert . assertNull ( compute . deleteNetwork ( com . google . cloud . compute . deprecated . ComputeImplTest . NETWORK_ID ) ) |
matchRequiredVersions_shouldAllowSingleEntryForRequiredVersion ( ) { java . lang . String openmrsVersion = "1.4.3" ; java . lang . String requiredOpenmrsVersion = "1.4.2" ; "<AssertPlaceHolder>" ; } matchRequiredVersions ( java . lang . String , java . lang . String ) { if ( org . apache . commons . lang3 . StringUtils... | org . junit . Assert . assertTrue ( org . openmrs . module . ModuleUtil . matchRequiredVersions ( openmrsVersion , requiredOpenmrsVersion ) ) |
stringReturnMethodTest ( ) { "<AssertPlaceHolder>" ; } methodReturnsString ( ) { return "XXXX" ; } | org . junit . Assert . assertEquals ( obj . methodReturnsString ( ) , "XXXX" ) |
ComplexTypeProperty ( ) { java . lang . String testENTITY = "testEntity" ; org . odata4j . edm . EdmEntityType . Builder entityType = EntityType ( testENTITY ) ; java . util . List < org . odata4j . edm . EdmComplexType . Builder > cpBuilderList = new java . util . ArrayList < org . odata4j . edm . EdmComplexType . Bui... | org . junit . Assert . assertEquals ( 0 , errors . size ( ) ) |
searchBadWordsTestTraditionalInvalid ( ) { final java . lang . String src = "" ; "<AssertPlaceHolder>" ; } searchBadWords ( java . lang . String ) { source = source . replaceAll ( "\\s" , "" ) ; for ( java . lang . String badWord : org . mewx . wenku8 . global . api . Wenku8API . badWords ) { if ( source . contains ( b... | org . junit . Assert . assertEquals ( "" , org . mewx . wenku8 . global . api . Wenku8API . searchBadWords ( src ) ) |
testCreateComment ( ) { org . eclipse . vorto . repository . comment . Comment comment = new org . eclipse . vorto . repository . comment . Comment ( org . eclipse . vorto . model . ModelId . fromReference ( "org.eclipse.vorto.examples.type.Color" , "1.0.0" ) , "erle" , "test<sp>comment" ) ; org . eclipse . vorto . rep... | org . junit . Assert . assertEquals ( "erle" , dto . getAuthor ( ) ) |
canSerializeBytes ( ) { java . lang . String field = "{<sp>\"name\":\"bytes1\",<sp>\"type\":\"bytes\"<sp>}" ; java . nio . ByteBuffer bb = java . nio . ByteBuffer . wrap ( "easy<sp>as<sp>one<sp>two<sp>three" . getBytes ( ) ) ; bb . rewind ( ) ; org . apache . avro . generic . GenericRecord r = serializeAndDeserialize (... | org . junit . Assert . assertEquals ( bb , r . get ( "bytes1" ) ) |
testInvalidField ( ) { org . nuxeo . ecm . core . api . DocumentModel doc = session . getDocument ( new org . nuxeo . ecm . core . api . PathRef ( "/folder/doc1" ) ) ; java . lang . String jsonDoc = getDocumentAsJson ( doc , "vocabularies_invalid_field" ) ; org . codehaus . jackson . JsonNode node = parseJson ( jsonDoc... | org . junit . Assert . assertEquals ( 0 , vocabs . size ( ) ) |
testImageServerMultipart ( ) { com . mashape . unirest . http . JsonNode jsonNode = com . mashape . unirest . http . Unirest . post ( "http://localhost:9060/transformimage" ) . header ( "accept" , "application/json" ) . field ( "file1" , new org . nd4j . linalg . io . ClassPathResource ( "testimages/class0/0.jpg" ) . g... | org . junit . Assert . assertEquals ( 3 , batchResult . size ( 0 ) ) |
validate_shouldFailValidationIfPatientIdentifierTypeNameAlreadyExist ( ) { org . openmrs . PatientIdentifierType type = new org . openmrs . PatientIdentifierType ( ) ; type . setName ( "OpenMRS<sp>Identification<sp>Number" ) ; type . setDescription ( "helps" ) ; java . lang . String valid50charInput = "1234567890123456... | org . junit . Assert . assertTrue ( errors . hasErrors ( ) ) |
testSize ( ) { boolean expResult = true ; javax . xml . xpath . XPathExpression expr = xpath . compile ( "//xs:element[@name='sizeField']//xs:minLength/@value<sp>=<sp>7<sp>and<sp>//xs:element[@name='sizeField']//xs:maxLength/@value<sp>=<sp>8" ) ; boolean result = ( ( java . lang . Boolean ) ( expr . evaluate ( schemaDo... | org . junit . Assert . assertEquals ( expResult , result ) |
illegalCharInCookieNameMakesStrictEncoderThrowsException ( ) { java . util . Set < java . lang . Character > illegalChars = new java . util . HashSet < java . lang . Character > ( ) ; for ( int i = 0 ; i <= 31 ; i ++ ) { illegalChars . add ( ( ( char ) ( i ) ) ) ; } illegalChars . add ( ( ( char ) ( 127 ) ) ) ; for ( c... | org . junit . Assert . assertEquals ( illegalChars . size ( ) , exceptions ) |
testStringWithoutWildcard ( ) { java . util . Collection < java . lang . String > serverPaths = new java . util . ArrayList ( ) ; serverPaths . add ( "/home/joseph/test/hi-lib-dal-mongo/somefile.java" ) ; java . util . Collection < java . lang . String > filters = new java . util . ArrayList ( ) ; filters . add ( "hi-l... | org . junit . Assert . assertFalse ( hudson . plugins . accurev . CheckForChanges . changesMatchFilter ( serverPaths , filters ) ) |
extractSelectorsLuceneQuery1 ( ) { datawave . audit . DatawaveSelectorExtractor extractor = new datawave . audit . DatawaveSelectorExtractor ( ) ; datawave . webservice . query . QueryImpl q = new datawave . webservice . query . QueryImpl ( ) ; q . setQuery ( "FIELD1:selector1" ) ; java . util . List < java . lang . St... | org . junit . Assert . assertEquals ( expected , selectorList ) |
testAcceptExcludeMessage ( ) { com . ibm . websphere . logging . hpel . reader . LogQueryBean lqb = new com . ibm . websphere . logging . hpel . reader . LogQueryBean ( ) ; lqb . setExcludeMessages ( new java . lang . String [ ] { "*Hello*" } ) ; com . ibm . websphere . logging . hpel . reader . LogRecordFilter lrf = n... | org . junit . Assert . assertFalse ( lrf . accept ( r ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.