input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
geenAutorisatieBijStelselBrpMaarDatumOvergangLeeg ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . ToegangLeveringsAutorisatie tla = maakToegangLeveringautorisatie ( SoortDienst . MUTATIELEVERING_OP_BASIS_VAN_DOELBINDING , true , true , true , true , true ) ; tla . getGeautoriseerde ( ) . getPartij ( ... | org . junit . Assert . assertTrue ( autorisatiebundels . isEmpty ( ) ) |
testDoSomethingAsynchronouslyUsingDoAnswer ( ) { final java . util . List < java . lang . String > results = java . util . Arrays . asList ( "One" , "Two" , "Three" ) ; doAnswer ( new org . mockito . stubbing . Answer ( ) { @ com . fernandocejas . testing . test . sample . junit . model . Override public java . lang . ... | org . junit . Assert . assertThat ( dummyCaller . getResult ( ) , org . hamcrest . core . Is . is ( org . hamcrest . CoreMatchers . equalTo ( results ) ) ) |
test_BizExceptionNoDefaultConstructor_WithType ( ) { com . alibaba . dubbo . common . model . BizExceptionNoDefaultConstructor e = new com . alibaba . dubbo . common . model . BizExceptionNoDefaultConstructor ( "Hello" ) ; com . alibaba . dubbo . common . serialize . ObjectOutput objectOutput = serialization . serializ... | org . junit . Assert . assertEquals ( "Hello" , ( ( com . alibaba . dubbo . common . model . BizExceptionNoDefaultConstructor ) ( read ) ) . getMessage ( ) ) |
shouldDropOnNegativeTimestamp ( ) { final java . util . List < org . apache . kafka . clients . consumer . ConsumerRecord < byte [ ] , byte [ ] > > records = java . util . Collections . singletonList ( new org . apache . kafka . clients . consumer . ConsumerRecord ( "topic" , 1 , 1 , ( - 1L ) , org . apache . kafka . c... | org . junit . Assert . assertEquals ( 0 , queue . size ( ) ) |
configured_value_set_to_true ( ) { allowingConfigurationToReturn ( EditingObjectsConfiguration . EDIT_OBJECTS_KEY , "true" ) ; facetFactory . process ( new org . apache . isis . core . metamodel . facets . FacetFactory . ProcessClassContext ( org . apache . isis . core . metamodel . facets . object . domainobject . Dom... | org . junit . Assert . assertNull ( facet ) |
invalid ( ) { fiftyfive . wicket . test . AbstractDocumentValidator validator = validator ( "html5-invalid.html" ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return ( ( this . errors . size ( ) ) == 0 ) && ( this . parsed ) ; } | org . junit . Assert . assertFalse ( validator . isValid ( ) ) |
testProjectProject ( ) { final org . apache . calcite . tools . RelBuilder builder = org . apache . calcite . tools . RelBuilder . create ( org . apache . calcite . test . RelBuilderTest . config ( ) . build ( ) ) ; org . apache . calcite . rel . RelNode root = builder . scan ( "EMP" ) . as ( "e" ) . projectPlus ( buil... | org . junit . Assert . assertThat ( root , org . apache . calcite . test . Matchers . hasTree ( expected ) ) |
testCorrectMatchOffsetIsReturnedWhenSkippingBytes ( ) { org . apache . storm . utils . Utils prevUtils = null ; try { org . apache . storm . utils . Utils mockedUtil = mock ( org . apache . storm . utils . Utils . class ) ; prevUtils = org . apache . storm . utils . Utils . setInstance ( mockedUtil ) ; when ( mockedUti... | org . junit . Assert . assertEquals ( expected , searchResult ) |
testEvaluationScoreNoZonePass ( ) { java . lang . String query = buildFunction ( phraseFunction , "-0.200" , Constants . TERM_OFFSET_MAP_JEXL_VARIABLE_NAME , "'dog'" , "'cat'" ) ; org . apache . commons . jexl2 . Expression expr = datawave . query . jexl . functions . ContentFunctionsTest . engine . createExpression ( ... | org . junit . Assert . assertTrue ( datawave . query . jexl . functions . ContentFunctionsTest . expect ( o , true ) ) |
testWithJSONStringArray ( ) { java . lang . String [ ] cats = new java . lang . String [ 10 ] ; cats [ 0 ] = "Felix" ; cats [ 5 ] = "Tom" ; java . lang . String sRick = new org . boon . json . serializers . impl . JsonSimpleSerializerImpl ( ) . serialize ( cats ) . toString ( ) ; java . lang . String [ ] gatos = new ja... | org . junit . Assert . assertArrayEquals ( cats , gatos ) |
serializeDoubleCollection ( ) { java . util . Collection < java . lang . Number > input = new java . util . ArrayList < java . lang . Number > ( ) ; java . util . Collections . addAll ( input , Double . MIN_VALUE , Double . MAX_VALUE ) ; java . lang . String expected = ( ( ( "[" + ( java . lang . String . valueOf ( Dou... | org . junit . Assert . assertEquals ( expected , output ) |
testGetGlobalOperation_Null ( ) { org . easymock . EasyMock . expect ( computeRpcMock . getGlobalOperation ( com . google . cloud . compute . deprecated . ComputeImplTest . GLOBAL_OPERATION_ID . getOperation ( ) , com . google . cloud . compute . deprecated . ComputeImplTest . EMPTY_RPC_OPTIONS ) ) . andReturn ( null )... | org . junit . Assert . assertNull ( compute . getOperation ( com . google . cloud . compute . deprecated . ComputeImplTest . GLOBAL_OPERATION_ID ) ) |
equalsWithOtherRollupWithSameLongValueReturnsTrue ( ) { com . rackspacecloud . blueflood . types . BluefloodTimerRollup . Percentile a = new com . rackspacecloud . blueflood . types . BluefloodTimerRollup . Percentile ( ( ( java . lang . Number ) ( 123L ) ) ) ; com . rackspacecloud . blueflood . types . BluefloodTimerR... | org . junit . Assert . assertTrue ( a . equals ( b ) ) |
testEqualsSingleParam ( ) { org . bff . javampd . command . MPDCommand command1 = new org . bff . javampd . command . MPDCommand ( "command1" , "param1" ) ; org . bff . javampd . command . MPDCommand command2 = new org . bff . javampd . command . MPDCommand ( "command1" , "param1" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( command1 , command2 ) |
getUpEntry_returnsEntryForUpLink ( ) { org . greenbuttonalliance . espi . common . models . atom . EntryType parentEntry = new org . greenbuttonalliance . espi . common . models . atom . EntryType ( ) ; org . greenbuttonalliance . espi . common . models . atom . EntryType childEntry = new org . greenbuttonalliance . es... | org . junit . Assert . assertEquals ( parentEntry , lookup . getUpEntry ( childEntry ) ) |
testGetLogos ( ) { final java . util . List < java . lang . String > logos = customizationService . getAssets ( com . hp . autonomy . frontend . find . idol . customization . CustomizationServiceImplIT . ASSET_TYPE ) ; "<AssertPlaceHolder>" ; } getAssets ( com . hp . autonomy . frontend . find . idol . customization . ... | org . junit . Assert . assertThat ( logos , org . hamcrest . core . Is . is ( org . hamcrest . Matchers . empty ( ) ) ) |
setTagBarWeightUsesCorrectPropertiesKey ( ) { java . util . Properties properties = new java . util . Properties ( ) ; properties . put ( "tagBarWeight" , "2" ) ; com . github . marabou . properties . UserProperties userProperties = userProperties ( properties ) ; userProperties . setTagBarWeight ( 1 ) ; "<AssertPlaceH... | org . junit . Assert . assertEquals ( "1" , properties . getProperty ( "tagBarWeight" ) ) |
testContainsArrayContainer_ExcludeShiftedSet ( ) { org . roaringbitmap . Container bc = new org . roaringbitmap . BitmapContainer ( ) . add ( 0 , 10 ) ; org . roaringbitmap . Container shifted = new org . roaringbitmap . ArrayContainer ( ) . add ( 2 , 12 ) ; "<AssertPlaceHolder>" ; } contains ( int ) { throw new java .... | org . junit . Assert . assertFalse ( bc . contains ( shifted ) ) |
testMatchesNotOverlapping ( ) { final com . allanbank . mongodb . bson . Document t = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . addInteger ( "b" , 2 ) . addInteger ( "d" , 3 ) . build ( ) ; final com . allanbank . mongodb . bson . Document [ ] tags = new com . allanbank . mongodb . bson ... | org . junit . Assert . assertFalse ( prefs . matches ( t ) ) |
testShouldReturnNewPathWithCallingConstructor ( ) { final java . lang . String sPath = "/path/segment" ; final org . eclipse . che . ide . resource . Path path = new org . eclipse . che . ide . resource . Path ( sPath ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( "LanguageDescriptionImpl{"... | org . junit . Assert . assertEquals ( path . toString ( ) , "/path/segment" ) |
testIsInRoleIsUsesAuthorizationHandler_True ( ) { com . eclipsesource . jaxrs . provider . security . AuthorizationHandler handler = mock ( com . eclipsesource . jaxrs . provider . security . AuthorizationHandler . class ) ; when ( handler . isUserInRole ( any ( java . security . Principal . class ) , anyString ( ) ) )... | org . junit . Assert . assertTrue ( isUserInRole ) |
is_present_returns_false_if_not_present ( ) { com . amazon . ask . response . SkillResponse < com . amazon . ask . sdk . TestHandlerOutput > skillResponse = new com . amazon . ask . response . impl . BaseSkillResponse ( marshaller , null ) ; "<AssertPlaceHolder>" ; } isPresent ( ) { return ( response ) != null ; } | org . junit . Assert . assertFalse ( skillResponse . isPresent ( ) ) |
testMath1129 ( ) { final double [ ] data = new double [ ] { - 0.012086732064244697 , - 0.24975668704012527 , 0.5706168483164684 , - 0.322111769955327 , 0.24166759508327315 , Double . NaN , 0.16698443218942854 , - 0.10427763937565114 , - 0.15595963093172435 , - 0.028075857595882995 , - 0.24137994506058857 , 0.4754317047... | org . junit . Assert . assertTrue ( ( iqr >= 0 ) ) |
test2_2 ( ) { int v = calcHits ( 1 , new int [ ] { 1 , 1 } ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 1 , v ) |
evaluateSupportVectorMachineAudit ( ) { org . jpmml . rattle . Batch batch = new org . jpmml . rattle . RattleBatch ( "SupportVectorMachine" , "Audit" ) ; "<AssertPlaceHolder>" ; } evaluate ( org . jpmml . evaluator . Batch ) { org . jpmml . evaluator . PMML pmml = org . jpmml . evaluator . IOUtil . unmarshal ( batch .... | org . junit . Assert . assertTrue ( org . jpmml . rattle . BatchUtil . evaluate ( batch ) ) |
mapsHobbitsTagToHobbitsObject ( ) { com . sjl . dsl4xml . example . LegacyDocumentReader < com . sjl . dsl4xml . example . SimpleXmlWithAttributesDynamicImplementationTest . Hobbits > _p = newMarshaller ( ) ; com . sjl . dsl4xml . example . SimpleXmlWithAttributesDynamicImplementationTest . Hobbits _h = _p . read ( get... | org . junit . Assert . assertEquals ( 4 , _h . size ( ) ) |
approveASuggestionInDraftOfASuggestionBox ( ) { org . silverpeas . components . suggestionbox . model . Suggestion suggestion = new org . silverpeas . components . suggestionbox . model . Suggestion ( "My<sp>suggestion" ) ; suggestion . setSuggestionBox ( suggestionBox ) ; suggestion . setContent ( "the<sp>content<sp>o... | org . junit . Assert . assertThat ( actual . getValidation ( ) . getStatus ( ) , is ( ContributionStatus . DRAFT ) ) |
testSerialization ( ) { org . jfree . chart . renderer . GrayPaintScale g1 = new org . jfree . chart . renderer . GrayPaintScale ( ) ; org . jfree . chart . renderer . GrayPaintScale g2 = ( ( org . jfree . chart . renderer . GrayPaintScale ) ( org . jfree . chart . TestUtils . serialised ( g1 ) ) ) ; "<AssertPlaceHolde... | org . junit . Assert . assertEquals ( g1 , g2 ) |
testPrunedAlphabet ( ) { final int KEEP_CNT = 3 ; lu . checkAndCreateCurrentLogDir ( "Runs" ) ; config . setLoggingUtil ( lu ) ; config . activateSubconfig ( "demo-nips" ) ; java . lang . String dataset_fn = config . getDatasetFilename ( ) ; cc . mallet . types . InstanceList instances = cc . mallet . util . LDAUtils .... | org . junit . Assert . assertEquals ( KEEP_CNT , pruned . size ( ) ) |
testGetUseMaven_defaultFalse ( ) { "<AssertPlaceHolder>" ; } getUseMaven ( ) { return useMaven ; } | org . junit . Assert . assertFalse ( config . getUseMaven ( ) ) |
standardInboundDocSubmission ( ) { java . lang . String localHCID = "1.1" ; java . lang . String senderHCID = "2.2" ; ihe . iti . xds_b . _2007 . ProvideAndRegisterDocumentSetRequestType request = new ihe . iti . xds_b . _2007 . ProvideAndRegisterDocumentSetRequestType ( ) ; gov . hhs . fha . nhinc . common . nhinccomm... | org . junit . Assert . assertSame ( expectedResponse , actualResponse ) |
readsPlainDBRefObject ( ) { com . mongodb . DBRef dbRef = new com . mongodb . DBRef ( "foo" , 2 ) ; org . bson . Document document = new org . bson . Document ( "ref" , dbRef ) ; org . springframework . data . mongodb . core . convert . MappingMongoConverterUnitTests . DBRefWrapper result = converter . read ( org . spr... | org . junit . Assert . assertThat ( result . ref , is ( dbRef ) ) |
testAddComment ( ) { login ( org . nuxeo . ftest . cap . TEST_USERNAME , org . nuxeo . ftest . cap . TEST_PASSWORD ) ; open ( org . nuxeo . ftest . cap . TestConstants . TEST_FILE_URL ) ; org . nuxeo . functionaltests . pages . tabs . CommentsTabSubPage page = asPage ( org . nuxeo . functionaltests . pages . DocumentBa... | org . junit . Assert . assertTrue ( page . hasComment ( "Comment<sp>number<sp>1" ) ) |
testSismember ( ) { redis1 . sadd ( key , value ) ; boolean b = redis1 . sismember ( key , value ) ; "<AssertPlaceHolder>" ; System . out . println ( java . lang . String . format ( "[CRAFT-ATOM-REDIS]<sp>(^_^)<sp><%s><sp>Case<sp>-><sp>test<sp>sismember.<sp>" , io . craft . atom . test . CaseCounter . incr ( 1 ) ) ) ; ... | org . junit . Assert . assertTrue ( b ) |
getCurrentUserWillReturnFeatureAdminWhenAuthoritiesContainFeatureAdminAuthority ( ) { java . util . Collection authorities = new java . util . ArrayList < org . springframework . security . core . GrantedAuthority > ( ) ; authorities . add ( new org . springframework . security . core . authority . SimpleGrantedAuthori... | org . junit . Assert . assertThat ( user . isFeatureAdmin ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
checkCreation ( ) { info . smart_tools . smartactors . message_bus . interfaces . imessage_bus_handler . IMessageBusHandler handler = new info . smart_tools . smartactors . message_bus . message_bus_handler . MessageBusHandler ( this . queue , 1 , this . chain , mock ( info . smart_tools . smartactors . base . interfac... | org . junit . Assert . assertNotNull ( handler ) |
containsPIIReturnsTrueForTrueSetting ( ) { this . parameters . put ( "contains_PII" , "true" ) ; org . phenotips . configuration . RecordElement s = new org . phenotips . configuration . spi . UIXRecordElement ( this . uiExtension , this . recordSection ) ; "<AssertPlaceHolder>" ; } containsPrivateIdentifiableInformati... | org . junit . Assert . assertTrue ( s . containsPrivateIdentifiableInformation ( ) ) |
notMatches ( ) { java . lang . String encodedPassword = randomString ( ) ; java . lang . Boolean result = encoderUnderTest . matches ( com . jedivision . utils . Base64PasswordEncoderTest . PASSWORD , encodedPassword ) ; "<AssertPlaceHolder>" ; } matches ( java . lang . CharSequence , java . lang . String ) { java . la... | org . junit . Assert . assertFalse ( result ) |
testOptionalTestNumbers ( ) { org . tap4j . consumer . TapConsumer tapConsumer = org . tap4j . consumer . TapConsumerFactory . makeTap13YamlConsumer ( ) ; org . tap4j . model . TestSet testSet = tapConsumer . load ( new java . io . File ( org . tap4j . parser . issue3406964 . TestDirectives . class . getResource ( "/or... | org . junit . Assert . assertEquals ( 3 , testSet . getTestResults ( ) . size ( ) ) |
testGetHint ( ) { mockHelper . replayAll ( ) ; classUnderTest . setSession ( mockSession ) ; "<AssertPlaceHolder>" ; mockHelper . verifyAll ( ) ; } getHint ( ) { return org . firebirdsql . squirrel . tab . IndexInfoTab . s_stringMgr . getString ( "IndexInfoTab.hint" ) ; } | org . junit . Assert . assertNotNull ( classUnderTest . getHint ( ) ) |
whenKeyIsAbsent_thenNotRewritten ( ) { java . util . Hashtable < com . baeldung . hashtable . Word , java . lang . String > table = new java . util . Hashtable < com . baeldung . hashtable . Word , java . lang . String > ( ) ; table . put ( new com . baeldung . hashtable . Word ( "cat" ) , "a<sp>small<sp>domesticated<s... | org . junit . Assert . assertThat ( table . get ( new com . baeldung . hashtable . Word ( "cat" ) ) , is ( "a<sp>small<sp>domesticated<sp>carnivorous<sp>mammal" ) ) |
testObtiene ( ) { log . debug ( "Debiera<sp>mostrar<sp>colportor" ) ; mx . edu . um . mateo . colportor . test . Usuario usuario = obtieneAsociado ( ) ; this . authenticate ( usuario , usuario . getPassword ( ) , new java . util . ArrayList < org . springframework . security . core . GrantedAuthority > ( usuario . getR... | org . junit . Assert . assertNotNull ( colportor . getId ( ) ) |
shouldConcatNoneAsUnrestricted ( ) { org . dcache . auth . attributes . Restriction concat = org . dcache . auth . attributes . Restrictions . concat ( ) ; "<AssertPlaceHolder>" ; } none ( ) { return org . dcache . auth . attributes . Restrictions . UNRESTRICTED ; } | org . junit . Assert . assertThat ( concat , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( org . dcache . auth . attributes . Restrictions . none ( ) ) ) ) |
getsXSLTTemplatesContextResolverAsContextResolver ( ) { org . everrest . core . impl . provider . XSLTTemplatesContextResolver contextResolver = xsltTemplatesContextResolver . getContext ( null ) ; "<AssertPlaceHolder>" ; } getContext ( java . lang . Class ) { return this ; } | org . junit . Assert . assertSame ( xsltTemplatesContextResolver , contextResolver ) |
resolveString ( ) { final java . nio . file . Path path = fileSystem . getPath ( "/toplevel/myDir/" ) ; final java . lang . String otherName = "/toplevel/myDir/myAsset" ; final java . nio . file . Path other = fileSystem . getPath ( otherName ) ; final java . nio . file . Path resolved = path . resolve ( otherName ) ; ... | org . junit . Assert . assertEquals ( other . toString ( ) , resolved . toString ( ) ) |
shouldBeAbleToRetrieveARelationship ( ) { long relationship = org . neo4j . server . rest . web . DatabaseActionsTest . graphdbHelper . createRelationship ( "ENJOYED" ) ; "<AssertPlaceHolder>" ; } getRelationship ( long ) { try { return output . ok ( actions . getRelationship ( relationshipId ) ) ; } catch ( org . neo4... | org . junit . Assert . assertNotNull ( org . neo4j . server . rest . web . DatabaseActionsTest . actions . getRelationship ( relationship ) ) |
testOnFailureByUserId ( ) { com . liferay . portal . security . auth . AuthPipelineTest . _atomicState . reset ( ) ; try { com . liferay . portal . security . auth . AuthPipeline . onFailureByUserId ( "auth.failure" , 0 , com . liferay . portal . kernel . test . util . RandomTestUtil . randomLong ( ) , null , null ) ; ... | org . junit . Assert . assertTrue ( com . liferay . portal . security . auth . AuthPipelineTest . _atomicState . isSet ( ) ) |
testGetFields ( ) { uk . ac . ebi . ep . ebeye . protein . model . EntryTest . LOGGER . info ( "getFields" ) ; java . util . List < java . lang . String > fieldNames = new java . util . ArrayList ( ) ; fieldNames . add ( uk . ac . ebi . ep . ebeye . protein . model . EntryTest . name ) ; uk . ac . ebi . ep . ebeye . mo... | org . junit . Assert . assertEquals ( expResult . getName ( ) , result . getName ( ) ) |
testParseNotIntErr ( ) { actions = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "type" , "aaa" ) ; put ( "eth_type" , "virtual01" ) ; } } ; target = new org . o3project . odenos . core . component . network . flow . query . OFPFlowActionPushPbbQuery ( actions ) ; "<AssertPlace... | org . junit . Assert . assertThat ( target . parse ( ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testDateType ( ) { com . effektif . workflow . api . workflow . ExecutableWorkflow workflow = new com . effektif . workflow . api . workflow . ExecutableWorkflow ( ) . variable ( "v" , new com . effektif . workflow . api . types . DateType ( ) ) ; deploy ( workflow ) ; org . joda . time . LocalDateTime value = new org ... | org . junit . Assert . assertEquals ( value , workflowInstance . getVariableValue ( "v" ) ) |
run ( ) { "<AssertPlaceHolder>" ; } valueOf ( java . lang . String ) { if ( ( ( oid . length ( ) ) > 0 ) && ( ! ( java . lang . Character . isDigit ( oid . charAt ( 0 ) ) ) ) ) { java . lang . Integer id = org . postgresql . core . Oid . NAME_TO_OID . get ( oid ) ; if ( id == null ) { id = org . postgresql . core . Oid... | org . junit . Assert . assertEquals ( expected , org . postgresql . core . Oid . valueOf ( value ) ) |
testGetBytesIndex ( ) { final zmq . Msg msg = initMsg ( ) ; final byte [ ] dst = new byte [ 4 ] ; msg . getBytes ( 1 , dst , 0 , 4 ) ; "<AssertPlaceHolder>" ; } getBytes ( int , byte [ ] , int , int ) { int count = java . lang . Math . min ( len , ( ( size ) - index ) ) ; if ( ( data ) == null ) { java . nio . ByteBuff... | org . junit . Assert . assertThat ( dst , org . hamcrest . CoreMatchers . is ( new byte [ ] { 1 , 2 , 3 , 4 } ) ) |
testJAXBCB_Server1 ( ) { TestLogger . logger . debug ( "------------------------------" ) ; java . lang . String reqString = "JAXBCustomBuilderServer1" ; org . apache . axis2 . jaxws . sample . wrap . sei . DocLitWrap proxy = getProxy ( ) ; proxy . twoWay ( "JAXBCustomBuilderMonitorStart" ) ; java . lang . String respo... | org . junit . Assert . assertTrue ( ( ( r . intValue ( ) ) >= 1 ) ) |
createTableAs6 ( ) { makeSeparateAIS ( ) ; java . lang . String sql = "CREATE<sp>TABLE<sp>t1<sp>(c1,<sp>c2,<sp>c3)<sp>AS<sp>(SELECT<sp>column1,<sp>column2<sp>FROM<sp>t2)<sp>WITH<sp>NO<sp>DATA" ; createTableAsMixGenerateAIS ( ) ; com . foundationdb . sql . parser . StatementNode stmt = parser . parseStatement ( sql ) ; ... | org . junit . Assert . assertTrue ( ( stmt instanceof com . foundationdb . sql . parser . CreateTableNode ) ) |
testRecursiveFiltering ( ) { org . eclipse . jgit . lib . ObjectId treeId = createTree ( "a.sth" , "a.txt" , "sub/b.sth" , "sub/b.txt" ) ; java . util . List < java . lang . String > paths = getMatchingPaths ( ".txt" , treeId , true ) ; java . util . List < java . lang . String > expected = java . util . Arrays . asLis... | org . junit . Assert . assertEquals ( expected , paths ) |
testcancelMarketOrderFailure ( ) { java . util . concurrent . atomic . AtomicInteger marketOrderCounter = testConfig . getMarketOrderIdCounter ( ) ; int marketOrderId = marketOrderCounter . getAndIncrement ( ) ; try { tradingServicesClient . cancelMarketOrder ( marketOrderId ) ; org . junit . Assert . fail ( ) ; } catc... | org . junit . Assert . assertEquals ( java . lang . String . format ( testConfig . getCancelMarketOrderErrorMsgPrefix ( ) , marketOrderId ) , ex . getMessage ( ) ) |
testAssociateRoutePolicyWithEdgeProfile ( ) { boolean response = com . cloud . network . cisco . CiscoVnmcConnectionTest . connection . associateTenantVDCEdgeStaticRoutePolicy ( com . cloud . network . cisco . CiscoVnmcConnectionTest . tenantName ) ; "<AssertPlaceHolder>" ; } associateTenantVDCEdgeStaticRoutePolicy ( j... | org . junit . Assert . assertTrue ( response ) |
isIpEqualsGatewayOrNetworkOfferingsEmptyTestExpectFalseServicesNotEmpty ( ) { java . util . List < com . cloud . network . Network . Service > services = new java . util . ArrayList < com . cloud . network . Network . Service > ( ) ; com . cloud . network . Network . Service serviceGateway = new com . cloud . network .... | org . junit . Assert . assertFalse ( result ) |
$skip0UserData200 ( ) { java . lang . String userDataId = "userdata001" ; org . json . simple . JSONObject body = new org . json . simple . JSONObject ( ) ; body . put ( "__id" , userDataId ) ; try { com . fujitsu . dc . test . utils . TResponse respons = createUserData ( body , HttpStatus . SC_CREATED ) ; java . util ... | org . junit . Assert . assertEquals ( 1 , results . size ( ) ) |
testRemoveReverseRecordButNotRemoveRecordWhenRecordExistsWithDifferentValueAndOverrideIsFalse ( ) { java . lang . String recordName = "recordname" ; java . lang . String recordIp = "40.30.20.10" ; java . lang . String domainName = "domain.name.com" ; java . lang . String reverseDomainName = "20.30.40.in-addr.arpa" ; ja... | org . junit . Assert . assertEquals ( true , answer . getResult ( ) ) |
testReplaceNicsMacSequenceInBootArgs ( ) { java . lang . String bootArgs = "nic_macs=02:00:65:b5:00:03|7C02:00:4f:1b:00:15|7C1e:00:54:00:00:0f|7C02:00:35:fa:00:11|7C02:00:47:40:00:12" ; doReturn ( bootArgs ) . when ( vmSpec ) . getBootArgs ( ) ; java . lang . String oldMacSequence = "7C02:00:35:fa:00:11|7C02:00:47:40:0... | org . junit . Assert . assertEquals ( newBootArgs , updatedBootArgs ) |
testGetRasterNames ( ) { axisMapping . addRasterName ( "algal" , "algal_1" ) ; axisMapping . addRasterName ( "algal" , "algal_2" ) ; final java . util . List < java . lang . String > rasterNames = axisMapping . getRasterNames ( "algal" ) ; final java . util . List < java . lang . String > expectedRasterNames = new java... | org . junit . Assert . assertEquals ( expectedRasterNames , rasterNames ) |
testCountWithTimestampInMessageAndCustomFormat ( ) { this . sink . input ( ) . send ( new org . springframework . messaging . support . GenericMessage < java . lang . Object > ( java . util . Collections . singletonMap ( "ts" , "14/10/1978" ) ) ) ; org . joda . time . DateTime endDate = new org . joda . time . DateTime... | org . junit . Assert . assertThat ( counts . getCounts ( ) , org . hamcrest . Matchers . equalTo ( new long [ ] { 0 , 0 , 1 , 0 , 0 } ) ) |
testMixInDelegation_canDelete ( ) { com . google . jenkins . plugins . delegate . AbstractRunnableItemGroupTest . TestImpl underTest = new com . google . jenkins . plugins . delegate . AbstractRunnableItemGroupTest . TestImpl ( mockFolder , "foo" , tabBar , views , mockMixIn ) ; when ( mockMixIn . canDelete ( mockView ... | org . junit . Assert . assertTrue ( underTest . canDelete ( mockView ) ) |
testLibraryDatasetToHistorySuccess ( ) { com . github . jmchilton . blend4j . galaxy . beans . Library library = buildEmptyLibrary ( "GalaxyHistoriesServiceIT.testLibraryDatasetToHistory" ) ; java . lang . String fileId = setupLibraries ( library , galaxyInstanceAdmin ) ; com . github . jmchilton . blend4j . galaxy . b... | org . junit . Assert . assertNotNull ( details ) |
testParseNullFirstPublicationDate ( ) { com . fasterxml . jackson . databind . ObjectMapper mapper = new com . fasterxml . jackson . databind . ObjectMapper ( ) ; java . lang . String jsonString = "{<sp>\"id\",\"0\",<sp>\"uid\":null,<sp>\"type\",\"0\",<sp>\"href\",\"0\",<sp>\"tags\":[],<sp>\"slugs\":[\"\"],<sp>\"lang\"... | org . junit . Assert . assertNull ( doc . getFirstPublicationDate ( ) ) |
getTimestampFromResultSet ( ) { au . com . bytecode . opencsv . Timestamp date = new au . com . bytecode . opencsv . Timestamp ( 109 , 11 , 15 , 12 , 0 , 0 , 0 ) ; long dateInMilliSeconds = date . getTime ( ) ; java . text . SimpleDateFormat timeFormat = new java . text . SimpleDateFormat ( ResultSetHelperService . DEF... | org . junit . Assert . assertArrayEquals ( expectedValues , columnValues ) |
testFilterGT ( ) { io . katharsis . queryspec . QuerySpec spec = new io . katharsis . queryspec . QuerySpec ( io . katharsis . resource . mock . models . Task . class ) ; spec . addFilter ( new io . katharsis . queryspec . FilterSpec ( java . util . Arrays . asList ( "id" ) , FilterOperator . GT , 1L ) ) ; java . util ... | org . junit . Assert . assertEquals ( 4 , results . size ( ) ) |
testUpdatePolicyAttributes_policyDoesntExist_assertException ( ) { boolean exceptionOccured = false ; try { polDao . updatePolicyAttributes ( 12345 , "" , null , null ) ; } catch ( org . nhindirect . config . store . ConfigurationStoreException ex ) { exceptionOccured = true ; } "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( exceptionOccured ) |
sendPaste ( ) { final java . net . URI expectedResult = new java . net . URI ( "www.abc.org" ) ; fi . helsinki . cs . tmc . core . domain . Exercise exercise = new fi . helsinki . cs . tmc . core . domain . Exercise ( "test-course" ) ; when ( mockCore . pasteWithComment ( any ( fi . helsinki . cs . tmc . core . domain ... | org . junit . Assert . assertEquals ( expectedResult , result ) |
testCompareElementsWhenElementsAreDifferent ( ) { com . sun . jna . ptr . PointerByReference root = new com . sun . jna . ptr . PointerByReference ( ) ; automation . getRootElement ( root ) ; com . sun . jna . platform . win32 . COM . Unknown uRoot = new com . sun . jna . platform . win32 . COM . Unknown ( root . getVa... | org . junit . Assert . assertTrue ( "Compare" , ( ( same . getValue ( ) ) == 0 ) ) |
shouldPurgeARetiredLocation ( ) { org . openmrs . Location location = service . getLocation ( 3 ) ; org . springframework . mock . web . MockHttpServletRequest req = request ( RequestMethod . DELETE , ( ( ( getURI ( ) ) + "/" ) + ( location . getUuid ( ) ) ) ) ; req . addParameter ( "purge" , "true" ) ; handle ( req ) ... | org . junit . Assert . assertNull ( service . getLocation ( 3 ) ) |
clear ( ) { com . baeldung . jhipster . gateway . security . oauth2 . CookieCollection cookies = new com . baeldung . jhipster . gateway . security . oauth2 . CookieCollection ( cookie ) ; cookies . clear ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( total ) == 0 ; } | org . junit . Assert . assertTrue ( cookies . isEmpty ( ) ) |
testSharepointFilterIsDisabled ( ) { com . liferay . portal . util . PropsUtil . set ( com . liferay . portal . sharepoint . SharepointFilter . class . getName ( ) , "false" ) ; com . liferay . portal . sharepoint . SharepointFilter sharepointFilter = new com . liferay . portal . sharepoint . SharepointFilter ( ) ; sha... | org . junit . Assert . assertFalse ( sharepointFilter . isFilterEnabled ( ) ) |
testPrimeNumber ( ) { final int [ ] primes = new int [ ] { 2 , 3 , 5 , 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 , 37 , 41 , 43 , 47 , 53 , 59 , 61 , 67 , 71 , 73 , 79 , 83 , 89 , 97 , 101 , 103 , 107 , 109 , 113 } ; for ( int i = 0 ; i < ( primes . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } primeNumber ( int ) { if ( ... | org . junit . Assert . assertEquals ( primes [ i ] , primeNumber ( i ) ) |
testSetLoginTimeout ( ) { dataSource . setLoginTimeout ( 1 ) ; "<AssertPlaceHolder>" ; } getLoginTimeout ( ) { return 0 ; } | org . junit . Assert . assertEquals ( 0 , dataSource . getLoginTimeout ( ) ) |
shouldEqualsReturnFalseIfThePointIsNull ( ) { int dimension = 5 ; org . uma . jmetal . util . point . Point point = new org . uma . jmetal . util . point . impl . ArrayPoint ( dimension ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ... | org . junit . Assert . assertFalse ( point . equals ( null ) ) |
testNoKeepAliveHeader ( ) { final org . apache . hc . core5 . http . protocol . HttpContext context = new org . apache . hc . core5 . http . protocol . BasicHttpContext ( null ) ; final org . apache . hc . core5 . http . HttpResponse response = new org . apache . hc . core5 . http . message . BasicHttpResponse ( org . ... | org . junit . Assert . assertEquals ( TimeValue . NEG_ONE_MILLISECONDS , d ) |
conversionUnsignedFullModulus ( ) { final java . math . BigInteger expectedUnsigned = BigInteger . ONE . shiftLeft ( 64 ) . add ( BigInteger . ONE ) ; java . math . BigInteger actualUnsigned = fieldDefinition . convertToUnsigned ( fieldDefinition . createElement ( expectedUnsigned ) ) ; "<AssertPlaceHolder>" ; } create... | org . junit . Assert . assertThat ( actualUnsigned , org . hamcrest . core . Is . is ( BigInteger . ONE ) ) |
testParse ( ) { final java . util . List < java . lang . String > list = new ch . cyberduck . core . ftp . list . FTPStatListService ( null , null ) . parse ( 212 , new java . lang . String [ ] { "<sp>drwxr-xr-x<sp>11<sp>root<sp>root<sp>8192<sp>Dec<sp>14<sp>23:44<sp>DK_BookStore" } ) ; "<AssertPlaceHolder>" ; } size ( ... | org . junit . Assert . assertEquals ( 1 , list . size ( ) ) |
testCycle ( org . jboss . weld . environment . servlet . test . lifecycle . Pinger ) { pinger . ping ( ) ; "<AssertPlaceHolder>" ; } getCalled ( ) { return org . jboss . weld . environment . servlet . test . lifecycle . Pinger . called ; } | org . junit . Assert . assertEquals ( 2 , org . jboss . weld . environment . servlet . test . lifecycle . Pinger . getCalled ( ) ) |
testGetProductMolecule ( ) { org . openscience . cdk . smiles . SmilesParser sp = new org . openscience . cdk . smiles . SmilesParser ( org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; org . openscience . cdk . interfaces . IAtomContainer target = sp . parseSmiles ( "C\\C=C/Nc1cccc(c1)N(O)\\C=C\... | org . junit . Assert . assertEquals ( 20 , smsd1 . getTarget ( ) . getAtomCount ( ) ) |
getUserSecurityNameWithTDSUser ( ) { java . lang . String user = "vmmtest" ; java . lang . String securityName = "vmmtest" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_Federation_2LDAPsTest . c , "getUserSecurityNameWithTDSUser" , "Checking<sp... | org . junit . Assert . assertEquals ( securityName , com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_Federation_2LDAPsTest . servlet . getUserSecurityName ( user ) ) |
shouldRemoveRelationshipFromExplicitIndex ( ) { long relId = addRelationshipToExplicitIndex ( ) ; try ( org . neo4j . internal . kernel . api . Transaction tx = org . neo4j . internal . kernel . api . ExplicitIndexCursorWritesTestBase . beginTransaction ( ) ) { org . neo4j . internal . kernel . api . ExplicitIndexWrite... | org . junit . Assert . assertFalse ( hits . hasNext ( ) ) |
testXmlCompare ( ) { org . omg . bpmn . miwg . api . AnalysisJob job = new org . omg . bpmn . miwg . api . AnalysisJob ( org . omg . bpmn . miwg . api . Consts . REFERENCE_DIR , "B.2.0" , org . omg . bpmn . miwg . api . Variant . Reference , org . omg . bpmn . miwg . facade . test . references . Reference_B_2_0_Test . ... | org . junit . Assert . assertEquals ( 0 , result . numFindings ( ) ) |
getSecond_A$ ( ) { com . m3 . scalaflavor4j . Tuple3 < java . lang . String , java . lang . Integer , java . lang . Long > tuple = com . m3 . scalaflavor4j . Tuple3 . apply ( "a" , 1 , 2L ) ; java . lang . Integer actual = tuple . getSecond ( ) ; java . lang . Integer expected = 1 ; "<AssertPlaceHolder>" ; } getSecond ... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
constructorCommentArgumentShouldSetPropertyComment ( ) { java . lang . String propertyComment = "propertyComment" ; resourceEditProperty = new ch . puzzle . itc . mobiliar . builders . ResourceEditPropertyBuilder ( ) . withComment ( propertyComment ) . build ( ) ; "<AssertPlaceHolder>" ; } getPropertyComment ( ) { retu... | org . junit . Assert . assertEquals ( propertyComment , resourceEditProperty . getPropertyComment ( ) ) |
testClearArchives ( ) { final org . apache . oozie . fluentjob . api . action . MapReduceActionBuilder builder = getBuilderInstance ( ) ; for ( final java . lang . String archive : org . apache . oozie . fluentjob . api . action . TestMapReduceActionBuilder . ARCHIVES ) { builder . withArchive ( archive ) ; } builder .... | org . junit . Assert . assertEquals ( 0 , archivesList . size ( ) ) |
testLastSpdySynReplyFrame ( ) { short type = 2 ; byte flags = 1 ; int length = 4 ; int streamId = ( ( io . netty . handler . codec . spdy . SpdyFrameDecoderTest . RANDOM . nextInt ( ) ) & 2147483647 ) | 1 ; io . netty . buffer . ByteBuf buf = io . netty . buffer . Unpooled . buffer ( ( ( io . netty . handler . codec . ... | org . junit . Assert . assertFalse ( buf . isReadable ( ) ) |
testCopyOfIterable ( ) { java . lang . Iterable < java . lang . String > iterable = asSet ( "Hello" ) ; "<AssertPlaceHolder>" ; } copyOf ( java . util . Collection ) { return new org . kocakosm . pitaya . collection . ImmutableSet < E > ( new java . util . LinkedHashSet < E > ( c ) ) ; } | org . junit . Assert . assertEquals ( iterable , org . kocakosm . pitaya . collection . ImmutableSet . copyOf ( iterable ) ) |
testMaxClusters ( ) { processingAttributes . put ( org . carrot2 . util . attribute . AttributeUtils . getKey ( org . carrot2 . clustering . stc . STCClusteringAlgorithm . class , "maxClusters" ) , 9 ) ; final java . util . Collection < org . carrot2 . core . Cluster > clusters = cluster ( SampleDocumentData . DOCUMENT... | org . junit . Assert . assertThat ( clusters . size ( ) ) |
testQ1Y1900Previous ( ) { org . jfree . data . time . Quarter previous = ( ( org . jfree . data . time . Quarter ) ( this . q1Y1900 . previous ( ) ) ) ; "<AssertPlaceHolder>" ; } previous ( ) { if ( ( this . step ) > 0 ) { final org . jfree . ui . WizardPanel previousPanel = getWizardPanel ( ( ( this . step ) - 1 ) ) ;... | org . junit . Assert . assertNull ( previous ) |
testParsingUserAndParameters ( ) { uri = "postgresql://user@?host=localhost&port=1234" ; actualParsedResult = parse ( uri ) ; expectedParsedResult = new io . vertx . core . json . JsonObject ( ) . put ( "user" , "user" ) . put ( "host" , "localhost" ) . put ( "port" , 1234 ) ; "<AssertPlaceHolder>" ; } parse ( java . l... | org . junit . Assert . assertEquals ( expectedParsedResult , actualParsedResult ) |
xor ( ) { net . time4j . Moment d0 = net . time4j . Moment . of ( 0 , TimeScale . POSIX ) ; net . time4j . Moment d1 = net . time4j . Moment . of ( 1 , TimeScale . POSIX ) ; net . time4j . Moment d2 = net . time4j . Moment . of ( 2 , TimeScale . POSIX ) ; net . time4j . Moment d3 = net . time4j . Moment . of ( 3 , Time... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( expected ) ) |
testSchemaLoad ( ) { org . teiid . query . metadata . TransformationMetadata tm = org . teiid . metadata . index . VDBMetadataFactory . getVDBMetadata ( ( ( org . teiid . core . util . UnitTestUtil . getTestDataPath ( ) ) + "/Test.vdb" ) ) ; org . teiid . metadata . Table t = tm . getGroupID ( "Northwind.Northwind.dbo.... | org . junit . Assert . assertFalse ( t . isVirtual ( ) ) |
shouldNotOutjectIfThereIsNoReturnType ( ) { when ( method . getMethod ( ) ) . thenReturn ( br . com . caelum . vraptor . interceptor . OutjectResultTest . MyComponent . class . getMethod ( "noReturn" ) ) ; "<AssertPlaceHolder>" ; } accepts ( java . lang . reflect . Method ) { return new org . hamcrest . TypeSafeMatcher... | org . junit . Assert . assertFalse ( interceptor . accepts ( method ) ) |
testAuthenticateCannotResolveUser ( ) { javax . jcr . SimpleCredentials sc = new javax . jcr . SimpleCredentials ( "unknownUser" , "pw" . toCharArray ( ) ) ; org . apache . jackrabbit . oak . spi . security . authentication . Authentication a = new org . apache . jackrabbit . oak . security . authentication . user . Us... | org . junit . Assert . assertFalse ( a . authenticate ( sc ) ) |
testEncodeOutputStream ( ) { org . ccnx . ccn . impl . support . Log . info ( Log . FAC_TEST , "Starting<sp>testEncodeOutputStream" ) ; org . ccnx . ccn . profiles . ccnd . FaceManager . FaceInstance face = new org . ccnx . ccn . profiles . ccnd . FaceManager . FaceInstance ( org . ccnx . ccn . profiles . ccnd . FaceMa... | org . junit . Assert . assertNotNull ( face ) |
testSingleton ( ) { final java . lang . String [ ] as = org . opencastproject . util . data . Arrays . singleton ( java . lang . String . class ) . apply ( "1" ) ; "<AssertPlaceHolder>" ; } apply ( java . lang . String ) { return org . opencastproject . assetmanager . impl . util . TestRole . mk ( role , organization )... | org . junit . Assert . assertEquals ( "1" , as [ 0 ] ) |
testEnqueueAddSame ( ) { final tlc2 . tool . queue . DummyTLCState state = new tlc2 . tool . queue . DummyTLCState ( ) ; final int j = 10 ; for ( int i = 0 ; i < j ; i ++ ) { sQueue . sEnqueue ( state ) ; } "<AssertPlaceHolder>" ; } size ( ) { return size ; } | org . junit . Assert . assertTrue ( ( ( sQueue . size ( ) ) == j ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.