input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
commitFormat_MultipleLines_notOk ( ) { java . lang . String commitMessage = "Simple<sp>message\nDetails" ; java . lang . String formattedMessage = org . eclipse . egit . ui . internal . dialogs . CommitMessageComponent . formatIssuesInCommitMessage ( commitMessage ) ; "<AssertPlaceHolder>" ; } formatIssuesInCommitMessa... | org . junit . Assert . assertEquals ( UIText . CommitMessageComponent_MessageSecondLineNotEmpty , formattedMessage ) |
test_user_settings_enforced_tls_get ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Method . GET... | org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) ) |
testLexerNotSetWithRange ( ) { org . antlr . v4 . tool . LexerGrammar lg = new org . antlr . v4 . tool . LexerGrammar ( ( "2:RULE_STOP<sp>0\n" 2 + "ID<sp>:<sp>~(\'a\'|\'b\'|\'e\'|\'p\'..\'t\')\n<sp>;" ) ) ; java . lang . String expecting = "max<sp>type<sp>1\n" + ( ( ( ( ( ( ( ( ( ( ( ( "2:RULE_STOP<sp>0\n" 5 + "1:RULE_... | org . junit . Assert . assertEquals ( expecting , result ) |
testClear ( ) { list . addTail ( a , 0 ) ; list . addTail ( b , 3 ) ; list . addTail ( c , 3 ) ; list . addTail ( d , 3 ) ; list . addTail ( e , 6 ) ; list . addTail ( f , 6 ) ; list . addTail ( g , 6 ) ; list . addTail ( h , 9 ) ; list . addTail ( i , 9 ) ; list . addTail ( j , 9 ) ; list . clear ( ) ; "<AssertPlaceHo... | org . junit . Assert . assertNull ( list . poll ( ) ) |
getPresentTermsReturnsTermsForAllPresentFeatures ( ) { final org . phenotips . panels . internal . PatientDataAdapter dataAdapter = this . adapterBuilder . build ( ) ; final java . util . Set < org . phenotips . vocabulary . VocabularyTerm > presentTerms = new java . util . HashSet ( ) ; presentTerms . add ( this . pos... | org . junit . Assert . assertEquals ( presentTerms , dataAdapter . getPresentTerms ( ) ) |
runTests ( ) { for ( com . epimorphics . lda . restlets . tests . TestExpiryTimeAsRFC1123 . QandA t : com . epimorphics . lda . restlets . tests . TestExpiryTimeAsRFC1123 . tests ) { java . lang . String when = com . epimorphics . lda . restlets . RouterRestletSupport . expiresAtAsRFC1123 ( t . when ) ; "<AssertPlaceHo... | org . junit . Assert . assertEquals ( t . date , when ) |
givenSamePasswordAndSalt_whenHashed_checkResultingHashesAreEqual ( ) { byte [ ] salt = new byte [ 16 ] ; secureRandom . nextBytes ( salt ) ; java . lang . String hash1 = hasher . hash ( "password" , salt ) ; java . lang . String hash2 = hasher . hash ( "password" , salt ) ; "<AssertPlaceHolder>" ; } hash ( java . lang ... | org . junit . Assert . assertEquals ( hash1 , hash2 ) |
indels_should_have_zero_margin_applied ( ) { au . edu . wehi . idsv . StructuralVariationCallBuilder builder = new au . edu . wehi . idsv . StructuralVariationCallBuilder ( getContext ( ) , ( ( au . edu . wehi . idsv . VariantContextDirectedEvidence ) ( new au . edu . wehi . idsv . IdsvVariantContextBuilder ( getContex... | org . junit . Assert . assertEquals ( 1 , de . getBreakpointEvidenceCount ( ) ) |
fullInformation ( ) { com . fasterxml . jackson . databind . ObjectMapper mapper = new com . fasterxml . jackson . databind . ObjectMapper ( ) ; com . fasterxml . jackson . databind . node . ObjectNode root = mapper . createObjectNode ( ) ; root . set ( "http://execution" 1 , mapper . createObjectNode ( ) . put ( "@id"... | org . junit . Assert . assertTrue ( actual . containsAllLogMissing ( expected ) ) |
testProxiedSubresource ( ) { javax . ws . rs . client . WebTarget target = org . jboss . resteasy . test . resource . basic . ResourceLocatorTest . client . target ( generateURL ( "/proxy/3" ) ) ; javax . ws . rs . core . Response res = target . queryParam ( "foo" , "1.2" ) . queryParam ( "foo" , "1.3" ) . request ( ) ... | org . junit . Assert . assertEquals ( 200 , res . getStatus ( ) ) |
shoudRejectANullSessionPersistenceObject ( ) { sp . setPersistenceType ( null ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( sp , HttpRequestType . POST ) ; "<AssertPlaceHolder>" ; } passedValidation ( ) { return expectationResultList . isEmpty ( ) ; } | org . junit . Assert . assertFalse ( result . passedValidation ( ) ) |
datumIngangVoorDatumEinde ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . ToegangLeveringsAutorisatie toegang = new nl . bzk . algemeenbrp . dal . domein . brp . entity . ToegangLeveringsAutorisatie ( new nl . bzk . algemeenbrp . dal . domein . brp . entity . PartijRol ( new nl . bzk . algemeenbrp . ... | org . junit . Assert . assertEquals ( 0 , errorCount ( toegang ) ) |
testQueryOnIdPropertyWithExplicitDocumentIdPresent ( ) { org . hibernate . search . test . id . Article hello = new org . hibernate . search . test . id . Article ( ) ; hello . setDocumentId ( 1 ) ; hello . setText ( "Hello<sp>World" ) ; org . hibernate . Session s = openSession ( ) ; org . hibernate . Transaction tx =... | org . junit . Assert . assertEquals ( 1 , results . size ( ) ) |
testNonDeterministicEncodingDueToAnOpenBracket_2 ( ) { java . lang . String encoded = this . encodeWithApacheWire ( new java . io . ByteArrayInputStream ( new byte [ ] { '[' , 'a' } ) ) ; byte [ ] decodedBack = this . decoder . decode ( encoded ) ; "<AssertPlaceHolder>" ; } decode ( java . lang . String ) { if ( ( base... | org . junit . Assert . assertArrayEquals ( new byte [ ] { '[' , 'a' } , decodedBack ) |
testBinaryContentImplSizeNotSet ( ) { java . io . InputStream is ; try { is = new java . io . FileInputStream ( content ) ; ddf . catalog . data . impl . BinaryContentImpl bci = new ddf . catalog . data . impl . BinaryContentImpl ( is , mimeType ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException e ) { ddf . ... | org . junit . Assert . assertEquals ( ( - 1 ) , bci . getSize ( ) ) |
testNull ( ) { java . lang . Object o = getResult ( null ) ; "<AssertPlaceHolder>" ; } getResult ( java . lang . Object ) { org . araqne . logdb . Row row = new org . araqne . logdb . Row ( ) ; row . put ( "var" , var ) ; org . araqne . logdb . query . expr . Expression expr = new org . araqne . logdb . query . expr . ... | org . junit . Assert . assertNull ( o ) |
matchesWhenReasonIsMapWithMutableKeysWithImmutableValues ( ) { org . mutabilitydetector . checkers . CollectionField collectionField = org . mutabilitydetector . checkers . CollectionField . from ( "Ljava/util/Map;" , "Ljava/util/Map<Lsome/mutable/Clazz;Lsome/immutable/OtherClazz;>;" ) ; org . mutabilitydetector . Muta... | org . junit . Assert . assertTrue ( matcher . matches ( reason ) ) |
testGetUUID ( ) { final org . kie . workbench . common . dmn . client . editors . included . IncludedModel includedModel = mock ( org . kie . workbench . common . dmn . client . editors . included . IncludedModel . class ) ; final java . lang . String expectedUUID = "123" ; when ( includedModel . getUUID ( ) ) . thenRe... | org . junit . Assert . assertEquals ( expectedUUID , actualUUID ) |
testBinarySearchFindsOnlyTheLeftMostValueInRangeAndNotOverTheValue ( ) { page . set ( 0 , 10 ) ; page . set ( 1 , 10 ) ; page . set ( 2 , 10 ) ; page . set ( 3 , 10 ) ; page . set ( 4 , 10 ) ; page . set ( 5 , 10 ) ; page . set ( 6 , 10 ) ; "<AssertPlaceHolder>" ; } binarySearch ( int , int , long ) { return binarySear... | org . junit . Assert . assertEquals ( 2 , page . binarySearch ( 2 , 5 , 10 ) ) |
testGetHookEnabledNull ( ) { when ( settingsService . getHook ( any ( ) ) ) . thenReturn ( null ) ; javax . ws . rs . core . Response actual = rest . getHookEnabled ( repository ) ; "<AssertPlaceHolder>" ; } getHookEnabled ( com . atlassian . bitbucket . repository . Repository ) { if ( authContext . isAuthenticated ( ... | org . junit . Assert . assertEquals ( Response . Status . NOT_FOUND . getStatusCode ( ) , actual . getStatus ( ) ) |
testSPOutParamWithExec ( ) { org . teiid . query . sql . lang . StoredProcedure proc = ( ( org . teiid . query . sql . lang . StoredProcedure ) ( helpResolve ( "exec<sp>pm2.spTest8(1)" , getMetadataFactory ( ) . exampleBQTCached ( ) ) ) ) ; "<AssertPlaceHolder>" ; } getProjectedSymbols ( ) { java . util . List < org . ... | org . junit . Assert . assertEquals ( 2 , proc . getProjectedSymbols ( ) . size ( ) ) |
testGetEventList_containsPartlyUnhookedEvents ( ) { org . eclipse . swt . widgets . Listener listener = mock ( org . eclipse . swt . widgets . Listener . class ) ; eventTable . hook ( org . eclipse . swt . widgets . EventTable_Test . EVENT_1 , listener ) ; eventTable . hook ( org . eclipse . swt . widgets . EventTable_... | org . junit . Assert . assertTrue ( containsEvent ( eventList , org . eclipse . swt . widgets . EventTable_Test . EVENT_1 ) ) |
shouldAllowAHandlerToBeRegistered ( ) { org . openqa . selenium . grid . server . Server < ? > server = new org . openqa . selenium . grid . server . BaseServer ( emptyOptions ) ; server . addRoute ( get ( "/cheese" ) . using ( ( req , res ) -> res . setContent ( "cheddar" . getBytes ( org . openqa . selenium . grid . ... | org . junit . Assert . assertEquals ( "cheddar" , response . getContentString ( ) ) |
test_dag_ancestors_1 ( ) { slib . graph . model . graph . utils . WalkConstraint wc = new slib . graph . utils . WalkConstraintGeneric ( org . openrdf . model . vocabulary . RDFS . SUBCLASSOF , slib . graph . model . graph . utils . Direction . OUT ) ; rvf = new slib . graph . algo . extraction . rvf . RVF_DAG ( g , wc... | org . junit . Assert . assertTrue ( ( ( anc . size ( ) ) == 1 ) ) |
testHasFontSize ( ) { com . eclipsesource . tabris . passepartout . internal . UIEnvironmentImpl uiEnvironment = new com . eclipsesource . tabris . passepartout . internal . UIEnvironmentImpl ( new com . eclipsesource . tabris . passepartout . Bounds ( 0 , 0 , 0 , 0 ) , new com . eclipsesource . tabris . passepartout .... | org . junit . Assert . assertEquals ( 16 , parentFontSize ) |
testToString ( ) { long length = 11111 ; long fileCount = 22222 ; long directoryCount = 33333 ; long quota = 44444 ; long spaceConsumed = 55555 ; long spaceQuota = 66665 ; org . apache . hadoop . fs . ContentSummary contentSummary = new org . apache . hadoop . fs . ContentSummary . Builder ( ) . length ( length ) . fil... | org . junit . Assert . assertEquals ( expected , contentSummary . toString ( ) ) |
testGetBoolean ( ) { v8 . executeVoidScript ( "x<sp>=<sp>true" ) ; boolean result = v8 . getBoolean ( "x" ) ; "<AssertPlaceHolder>" ; } getBoolean ( java . lang . String ) { throw new java . lang . UnsupportedOperationException ( ) ; } | org . junit . Assert . assertTrue ( result ) |
testBuildListMessagesURL ( ) { java . lang . String expected = "/admin/messages?startChangeNumber=345&type=EVALUATION&limit=987" ; java . lang . String url = org . sagebionetworks . client . SynapseAdminClientImpl . buildListMessagesURL ( new java . lang . Long ( 345 ) , ObjectType . EVALUATION , new java . lang . Long... | org . junit . Assert . assertEquals ( expected , url ) |
test_NoCardinality ( ) { int expected = org . roaringbitmap . realdata . RealDataBenchmarkOrTest . EXPECTED_RESULTS_NO_CARDINALITY . get ( dataset ) ; org . roaringbitmap . realdata . RealDataBenchmarkOr bench = new org . roaringbitmap . realdata . RealDataBenchmarkOr ( ) ; "<AssertPlaceHolder>" ; } pairwiseOr_NoCardin... | org . junit . Assert . assertEquals ( expected , bench . pairwiseOr_NoCardinality ( bs ) ) |
testRemove ( ) { com . liferay . asset . display . page . model . AssetDisplayPageEntry newAssetDisplayPageEntry = addAssetDisplayPageEntry ( ) ; _persistence . remove ( newAssetDisplayPageEntry ) ; com . liferay . asset . display . page . model . AssetDisplayPageEntry existingAssetDisplayPageEntry = _persistence . fet... | org . junit . Assert . assertNull ( existingAssetDisplayPageEntry ) |
testGetTasksAssignedAsExcludedOwnerWithUserLangOneTask ( ) { java . lang . String str = "(with<sp>(new<sp>Task())<sp>{<sp>priority<sp>=<sp>55,<sp>taskData<sp>=<sp>(with(<sp>new<sp>TaskData())<sp>{<sp>}<sp>),<sp>" ; str += "peopleAssignments<sp>=<sp>(with<sp>(<sp>new<sp>PeopleAssignments()<sp>)<sp>{<sp>excludedOwners<sp... | org . junit . Assert . assertEquals ( 1 , tasks . size ( ) ) |
largeTest ( ) { final int size = 1000000 ; org . eclipse . tracecompass . segmentstore . core . ISegmentStore < org . eclipse . tracecompass . segmentstore . core . @ org . eclipse . jdt . annotation . NonNull ISegment > fixture = org . eclipse . tracecompass . segmentstore . core . SegmentStoreFactory . createSegmentS... | org . junit . Assert . assertNotNull ( getTable ( ) ) |
testGetSamplesForProject ( ) { java . lang . String samplesHref = "http://somewhere/projects/5/samples" ; ca . corefacility . bioinformatics . irida . model . project . Project project = new ca . corefacility . bioinformatics . irida . model . project . Project ( ) ; project . add ( new org . springframework . hateoas ... | org . junit . Assert . assertEquals ( samples , samplesForProject ) |
headsWithQueryParametersDirectlyFrom1_0OriginsCanBeNotCacheableEvenWithExpires ( ) { policy = new org . apache . hc . client5 . http . impl . cache . ResponseCachingPolicy ( 0 , true , true , false ) ; request = new org . apache . hc . core5 . http . message . BasicHttpRequest ( "HEAD" , "/foo?s=bar" ) ; response = new... | org . junit . Assert . assertFalse ( policy . isResponseCacheable ( request , response ) ) |
testBuildWithParametersAndDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . person . paper . PersonPaper personPaper = new org . lnu . is . domain . person . paper . PersonPaper ( ) ; org . lnu . is . domain . person . Person person = new org . lnu . ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
hostname ( ) { java . lang . String hostname = java . lang . System . getenv ( "HOSTNAME" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( hostname ) |
isActiveWillReturnFalseWhenRolesParamIsBlank ( ) { org . mockito . Mockito . when ( user . getAttribute ( org . togglz . core . activation . UserRoleActivationStrategy . USER_ATTRIBUTE_ROLES ) ) . thenReturn ( userRoles ) ; org . mockito . Mockito . when ( state . getParameter ( org . togglz . core . activation . UserR... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) ) |
testRemove ( ) { com . liferay . expando . kernel . model . ExpandoTable newExpandoTable = addExpandoTable ( ) ; _persistence . remove ( newExpandoTable ) ; com . liferay . expando . kernel . model . ExpandoTable existingExpandoTable = _persistence . fetchByPrimaryKey ( newExpandoTable . getPrimaryKey ( ) ) ; "<AssertP... | org . junit . Assert . assertNull ( existingExpandoTable ) |
testNuOfCustomers ( ) { com . graphhopper . jsprit . core . problem . VehicleRoutingProblem . Builder vrpBuilder = VehicleRoutingProblem . Builder . newInstance ( ) ; new com . graphhopper . jsprit . instance . reader . CordeauReader ( vrpBuilder ) . read ( getPath ( "p01" ) ) ; com . graphhopper . jsprit . core . prob... | org . junit . Assert . assertEquals ( 50 , vrp . getJobs ( ) . values ( ) . size ( ) ) |
testReadExtendedWithService ( ) { org . switchyard . config . model . composite . CompositeModel cm = org . switchyard . config . model . composite . CompositeModelTests . _puller . pull ( org . switchyard . config . model . composite . CompositeModelTests . EXTENDED_XML , getClass ( ) ) ; org . switchyard . config . m... | org . junit . Assert . assertEquals ( 1 , component . getServices ( ) . size ( ) ) |
g_V_matchXa_created_b__a_repeatXoutX_timesX2XX_selectXa_bX ( ) { final org . apache . tinkerpop . gremlin . process . traversal . Traversal < org . apache . tinkerpop . gremlin . structure . Vertex , java . util . Map < java . lang . String , org . apache . tinkerpop . gremlin . structure . Vertex > > traversal = get_g... | org . junit . Assert . assertTrue ( traversal . hasNext ( ) ) |
getRenderedFeatureFileContentReplaceBackslashesInCommentsTest ( ) { java . lang . String expectedOutput = "@featureTag1\n" 0 + ( ( ( ( ( ( ( ( ( ( ( ( "@featureTag1\n" + "@featureTag2\n" ) + "@scenarioTag1\n" 8 ) + "@featureTag1\n" 1 ) + "@featureTag1\n" 3 ) + "@scenarioTag1\n" ) + "@scenarioTag1\n" 0 ) + "Scenario:<sp... | org . junit . Assert . assertThat ( renderedFeatureFileContent , org . hamcrest . core . Is . is ( expectedOutput ) ) |
testGetString ( ) { com . aliyun . odps . Table table = odps . tables ( ) . get ( tableName ) ; "<AssertPlaceHolder>" ; } get ( int ) { return values [ index ] ; } | org . junit . Assert . assertNotNull ( table ) |
testDriverClassChange ( ) { when ( view . getDriverClass ( ) ) . thenReturn ( org . kie . workbench . common . screens . datasource . management . client . editor . driver . DRIVER_CLASS ) ; mainPanel . onDriverClassChange ( ) ; verify ( view , times ( 1 ) ) . getDriverClass ( ) ; "<AssertPlaceHolder>" ; } getDriverCla... | org . junit . Assert . assertEquals ( org . kie . workbench . common . screens . datasource . management . client . editor . driver . DRIVER_CLASS , driverClass ) |
shouldDecodeHexStringToByteArrayUsingBigInteger ( ) { byte [ ] bytes = getSampleBytes ( ) ; java . lang . String hexString = getSampleHexString ( ) ; byte [ ] output = hexStringConverter . decodeUsingBigInteger ( hexString ) ; "<AssertPlaceHolder>" ; } decodeUsingBigInteger ( java . lang . String ) { byte [ ] byteArray... | org . junit . Assert . assertArrayEquals ( bytes , output ) |
read ( ) { com . asakusafw . runtime . io . json . value . IntOptionPropertyAdapter adapter = builder . build ( ) ; com . asakusafw . runtime . value . IntOption option = new com . asakusafw . runtime . value . IntOption ( ) ; adapter . read ( new com . asakusafw . runtime . io . json . value . MockValue ( 100 ) , opti... | org . junit . Assert . assertThat ( option , is ( new com . asakusafw . runtime . value . IntOption ( 100 ) ) ) |
whenMonsterWantWalkToNextCellIfItEndBoard ( ) { ru . bomberman . test . Cell [ ] [ ] gameBoard = new ru . bomberman . test . Cell [ 4 ] [ 4 ] ; for ( int row = 0 ; row < 4 ; row ++ ) { for ( int column = 0 ; column < 4 ; column ++ ) { gameBoard [ row ] [ column ] = new ru . bomberman . test . Cell ( ) ; } } ru . bomber... | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( false ) ) |
purgeConceptReferenceTerm_shouldFailIfGivenConceptReferenceTermIsInUse ( ) { org . openmrs . ConceptReferenceTerm refTerm = conceptService . getConceptReferenceTerm ( 1 ) ; "<AssertPlaceHolder>" ; expectedException . expect ( org . openmrs . api . APIException . class ) ; expectedException . expectMessage ( "Reference<... | org . junit . Assert . assertNotNull ( refTerm ) |
calendarUtils_getFirstDayOfCurrentMonth_calendarAsFirstDayOfCurrentMonthReturned ( ) { java . util . Calendar testInput = java . util . Calendar . getInstance ( ) ; java . util . Calendar expResult = dk . i2m . converge . core . utils . CalendarUtils . getFirstDayOfMonth ( testInput ) ; java . util . Calendar result = ... | org . junit . Assert . assertEquals ( expResult , result ) |
multipleStatusesComeOutInTheRightOrder ( ) { java . util . ArrayList < java . lang . String > statuses = new java . util . ArrayList ( ) ; statuses . add ( "Test1" ) ; statuses . add ( "Test2" ) ; statuses . add ( "Test3" ) ; try ( org . neo4j . graphdb . Transaction tx = graphDb . beginTx ( ) ) { org . neo4j . example... | org . junit . Assert . assertThat ( update . getStatusText ( ) , org . hamcrest . CoreMatchers . equalTo ( statuses . get ( i ) ) ) |
testTreeWithOneItemIsNotEmpty ( ) { com . github . davidmoten . rtree . RTree < java . lang . Object , com . github . davidmoten . rtree . geometry . Geometry > tree = com . github . davidmoten . rtree . RTree . create ( ) . add ( com . github . davidmoten . rtree . RTreeTest . e ( 1 ) ) ; "<AssertPlaceHolder>" ; } isE... | org . junit . Assert . assertFalse ( tree . isEmpty ( ) ) |
testNoError ( ) { boolean result = checkNoError ( "Social_Search_REST_My_Person_Search" , true ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
testSetNamespace ( ) { ( ( com . openshift . internal . restclient . model . Service ) ( service ) ) . setNamespace ( "foo" ) ; "<AssertPlaceHolder>" ; } getNamespaceName ( ) { return asString ( com . openshift . internal . restclient . model . METADATA_NAMESPACE ) ; } | org . junit . Assert . assertEquals ( "foo" , service . getNamespaceName ( ) ) |
testUnsignedByte ( ) { byte wrapped = - 96 ; short value = unsigned ( wrapped ) ; System . out . printf ( "in<sp>:<sp>%X<sp>out<sp>:<sp>%X\n" , wrapped , value ) ; "<AssertPlaceHolder>" ; } unsigned ( byte ) { return ( ( short ) ( 255 & value ) ) ; } | org . junit . Assert . assertEquals ( wrapped , ( ( byte ) ( value ) ) ) |
testPosModByZero6 ( ) { org . apache . hadoop . hive . ql . udf . generic . GenericUDFPosMod udf = new org . apache . hadoop . hive . ql . udf . generic . GenericUDFPosMod ( ) ; org . apache . hadoop . hive . serde2 . io . DoubleWritable d1 = new org . apache . hadoop . hive . serde2 . io . DoubleWritable ( 4.5 ) ; org... | org . junit . Assert . assertNull ( d3 ) |
testFailedWrite ( ) { final org . eclipse . xtend . core . xtend . XtendFile file = this . file ( "class<sp>C{}" ) ; java . io . ByteArrayOutputStream _byteArrayOutputStream = new java . io . ByteArrayOutputStream ( ) ; org . eclipse . emf . ecore . resource . Resource _eResource = file . eResource ( ) ; new org . ecli... | org . junit . Assert . assertTrue ( resource . eAdapters ( ) . remove ( removeMe ) ) |
entityMedia ( ) { final org . apache . olingo . commons . api . edm . EdmEntitySet edmEntitySet = org . apache . olingo . server . core . serializer . json . ODataJsonSerializerTest . entityContainer . getEntitySet ( "ESMedia" ) ; final org . apache . olingo . commons . api . data . Entity entity = data . readAll ( edm... | org . junit . Assert . assertEquals ( expectedResult , resultString ) |
testRangeIn10MinWithPast ( ) { int range10min = 10 ; java . util . Date date5MinInPast = org . apache . commons . lang3 . time . DateUtils . addMinutes ( new java . util . Date ( ) , ( - 5 ) ) ; "<AssertPlaceHolder>" ; } isInRangeMinutes ( java . util . Date , java . util . Date , int ) { int rangeInSeconds = rangeInMi... | org . junit . Assert . assertTrue ( org . digidoc4j . utils . DateUtils . isInRangeMinutes ( date5MinInPast , new java . util . Date ( ) , range10min ) ) |
testBuildWithParametersWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . String abbrName = "abbrname" ; org . lnu . is . domain . gender . type . GenderType context = new org . lnu . is . domain . gender . type . GenderType ( ) ; context . setAbbrName ( abbrN... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testShiftNullFloat ( ) { final float [ ] array = null ; org . fintx . util . Arrays . shift ( array , 1 ) ; "<AssertPlaceHolder>" ; } shift ( T , int ) { org . fintx . util . Arrays . shift ( array , 0 , Integer . MAX_VALUE , offset ) ; } | org . junit . Assert . assertNull ( array ) |
forEach ( ) { com . gs . collections . api . bag . MutableBag < java . lang . Integer > result = com . gs . collections . impl . bag . mutable . HashBag . newBag ( ) ; com . gs . collections . api . bag . MutableBag < java . lang . Integer > collection = com . gs . collections . impl . bag . mutable . MultiReaderHashBa... | org . junit . Assert . assertEquals ( com . gs . collections . impl . bag . mutable . HashBag . newBagWith ( 1 , 2 , 3 , 4 , 4 ) , result ) |
testFormatToUsedInOutputJava ( ) { final org . apache . logging . log4j . message . ObjectMapMessage msg = new org . apache . logging . log4j . message . ObjectMapMessage ( ) . with ( "key" , new org . apache . logging . log4j . message . MapMessageTest . FormattableTestType ( ) ) ; final java . lang . String result = ... | org . junit . Assert . assertEquals ( expected , result ) |
getConfigurations_good_case ( ) { java . lang . String connectionString = "HostName=aaa.bbb.ccc;SharedAccessKeyName=XXX;SharedAccessKey=YYY" ; int numberOfConfigs = 10 ; getConfigsExpectations ( connectionString , numberOfConfigs ) ; tests . unit . com . microsoft . azure . sdk . iot . service . RegistryManager registr... | org . junit . Assert . assertEquals ( 2 , configs . size ( ) ) |
testDalConnection ( ) { java . sql . Connection conn = null ; try { com . ctrip . platform . dal . dao . client . DalConnection test = getConnection ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Throwable e ) { org . junit . Assert . fail ( ) ; e . printStackTrace ( ) ; } finally { if ( conn != null ) conn . cl... | org . junit . Assert . assertNotNull ( test ) |
test16GetXGroupUsers ( ) { org . apache . ranger . common . SearchCriteria testSearchCriteria = createsearchCriteria ( ) ; testSearchCriteria . addParam ( "xGroupId" , org . apache . ranger . biz . TestXUserMgr . userId ) ; org . apache . ranger . view . VXGroupUserList vxGroupUserList = vxGroupUserList ( ) ; org . moc... | org . junit . Assert . assertNotNull ( dbVXUserList ) |
ordinaryParamNameTest ( ) { org . apache . cxf . frontend . ClientProxyFactoryBean proxyFac = new org . apache . cxf . frontend . ClientProxyFactoryBean ( ) ; org . apache . cxf . wsdl . service . factory . ReflectionServiceFactoryBean factory = new org . apache . cxf . wsdl . service . factory . ReflectionServiceFacto... | org . junit . Assert . assertEquals ( "reflection" , boing ) |
testLayoutExport ( ) { org . nuxeo . ecm . platform . forms . layout . api . LayoutDefinition lDef = service . getLayoutDefinition ( WebLayoutManager . JSF_CATEGORY , "layoutColumnsTest" ) ; "<AssertPlaceHolder>" ; java . io . File file = org . nuxeo . runtime . api . Framework . createTempFile ( "layout-export" , ".js... | org . junit . Assert . assertNotNull ( lDef ) |
testAReasonReturnsString ( ) { reason . append ( "reason<sp>1" ) ; "<AssertPlaceHolder>" ; } getReason ( ) { return isNotVetoing ( ) ? null : reasonBuf . toString ( ) ; } | org . junit . Assert . assertEquals ( "reason<sp>1" , reason . getReason ( ) ) |
testLookAt ( ) { com . hackoeur . jglm . Mat4 got = com . hackoeur . jglm . Matrices . lookAt ( new com . hackoeur . jglm . Vec3 ( 1.0F , 2.0F , 3.0F ) , new com . hackoeur . jglm . Vec3 ( 4.0F , 5.0F , 6.0F ) , new com . hackoeur . jglm . Vec3 ( 7.0F , 8.0F , 9.0F ) ) ; com . hackoeur . jglm . Mat4 expected = new com ... | org . junit . Assert . assertEquals ( expected , got ) |
testSignVerify1 ( ) { ch . bfh . unicrypt . math . algebra . multiplicative . classes . GStarModSafePrime g_q = ch . bfh . unicrypt . math . algebra . multiplicative . classes . GStarModSafePrime . getInstance ( 23 ) ; ch . bfh . unicrypt . math . algebra . multiplicative . classes . GStarModElement g = g_q . getElemen... | org . junit . Assert . assertTrue ( result . getValue ( ) ) |
should_filter_if_user_is_null ( ) { java . util . List < org . mamute . model . Comment > visibleComments = commentList . getVisibleCommentsFor ( null , invisibleComments ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return comments . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( visibleComments . isEmpty ( ) ) |
testUnmarshalAsStringlist ( ) { java . lang . String [ ] entityIds = new java . lang . String [ ] { "key1" , "key2" } ; org . apache . eagle . service . generic . GenericEntityServiceResource genericEntityServiceResource = new org . apache . eagle . service . generic . GenericEntityServiceResource ( ) ; java . lang . r... | org . junit . Assert . assertArrayEquals ( entityIds , result . toArray ( ) ) |
testInitialize ( ) { org . eclipse . rap . rwt . internal . theme . css . StyleSheet styleSheet = org . eclipse . rap . rwt . internal . theme . ThemeTestUtil . getStyleSheet ( org . eclipse . rap . rwt . internal . theme . Theme_Test . TEST_SYNTAX_CSS ) ; org . eclipse . rap . rwt . internal . theme . Theme theme = ne... | org . junit . Assert . assertNotNull ( theme . getValuesMap ( ) ) |
emptySequenceXY ( ) { it . geosolutions . jaiext . jts . CoordinateSequence2D cs = new it . geosolutions . jaiext . jts . CoordinateSequence2D ( null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . length ; } | org . junit . Assert . assertEquals ( 0 , cs . size ( ) ) |
assertExecuteForSinglePreparedStatementFailureWithDML ( ) { java . sql . PreparedStatement preparedStatement = getPreparedStatement ( ) ; java . sql . SQLException exp = new java . sql . SQLException ( ) ; when ( preparedStatement . execute ( ) ) . thenThrow ( exp ) ; setExecuteGroups ( java . util . Collections . sing... | org . junit . Assert . assertFalse ( actual . execute ( ) ) |
testRemoveResource ( ) { try { int previousSize = org . opennaas . core . resources . tests . ResourceRepositoryTest . resourceRepository . listResources ( ) . size ( ) ; org . opennaas . core . resources . descriptor . ResourceDescriptor descriptor = newResourceDescriptor ( "Resource<sp>Mock<sp>CreateRemove" ) ; org .... | org . junit . Assert . assertTrue ( ( ( org . opennaas . core . resources . tests . ResourceRepositoryTest . resourceRepository . listResources ( ) . size ( ) ) == previousSize ) ) |
testGetEncodeGZipNullProps ( ) { org . eclipse . kura . core . cloud . CloudServiceOptions options = new org . eclipse . kura . core . cloud . CloudServiceOptions ( null , org . eclipse . kura . core . cloud . CloudServiceOptionsTest . systemService ) ; boolean gzip = options . getEncodeGzip ( ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertFalse ( gzip ) |
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMS10 icms10 = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMS10 ( ) ; icms10 . setModalidadeBCICMS ( NFNotaInfoItemModalidadeBCICMS . PAUT... | org . junit . Assert . assertEquals ( xmlEsperado , icms10 . toString ( ) ) |
typedAction_typeMatch_canExecute ( ) { com . gwtplatform . dispatch . rpc . client . interceptor . AbstractRpcInterceptor < com . gwtplatform . dispatch . rpc . client . interceptor . AbstractRpcInterceptorTest . TypedAction1 , com . gwtplatform . dispatch . rpc . shared . Result > interceptor = createInterceptor ( com... | org . junit . Assert . assertTrue ( canExecute ) |
unbound_changeFieldValue_beanValueNotUpdated ( ) { bindName ( ) ; nameField . setValue ( "Henri" ) ; binder . removeBean ( ) ; nameField . setValue ( "Aleksi" ) ; "<AssertPlaceHolder>" ; } getFirstName ( ) { return "First" ; } | org . junit . Assert . assertEquals ( "Henri" , item . getFirstName ( ) ) |
testIndexingWithMmul ( ) { org . nd4j . linalg . api . ndarray . INDArray a = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 9 , 9 , DataType . DOUBLE ) . reshape ( 3 , 3 ) ; org . nd4j . linalg . api . ndarray . INDArray b = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 5 , 5 , DataType . DOUBLE ) . res... | org . junit . Assert . assertEquals ( assertion , c ) |
testLinspace2 ( ) { org . nd4j . OpValidationSuite . ignoreFailing ( ) ; org . nd4j . autodiff . samediff . SameDiff sd = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . autodiff . samediff . SDVariable out = sd . linspace ( "linspace" , sd . constant ( org . nd4j . linalg . factory . Nd4j . sca... | org . junit . Assert . assertNull ( err ) |
matchesNot ( ) { final org . metricssampler . extensions . base . ELValueTransformerConfig config = new org . metricssampler . extensions . base . ELValueTransformerConfig ( java . util . regex . Pattern . compile ( "a.*c" ) , "value" ) ; final org . metricssampler . extensions . base . ELValueTransformer testee = new ... | org . junit . Assert . assertFalse ( result ) |
testLoginFailed ( ) { com . hp . application . automation . tools . model . SseModel model = createBvsModel ( ) ; model . setAlmServerUrl ( com . hp . application . automation . tools . sse . sdk . URL ) ; com . hp . application . automation . tools . sse . sdk . Args args = new com . hp . application . automation . to... | org . junit . Assert . assertNull ( testsuites ) |
testNotificationSettings ( ) { org . gitlab4j . api . models . NotificationSettings settings = org . gitlab4j . api . JsonUtils . unmarshalResource ( org . gitlab4j . api . models . NotificationSettings . class , "notification-settings.json" ) ; "<AssertPlaceHolder>" ; } compareJson ( T , java . lang . String ) { java ... | org . junit . Assert . assertTrue ( org . gitlab4j . api . JsonUtils . compareJson ( settings , "notification-settings.json" ) ) |
isFilterTagSelected_emptyString ( ) { bean . setFilterTag ( "<sp>" ) ; boolean tagSelected = bean . isFilterTagSelected ( ) ; "<AssertPlaceHolder>" ; } isFilterTagSelected ( ) { bean . setFilterTag ( "aTag" ) ; boolean tagSelected = bean . isFilterTagSelected ( ) ; org . junit . Assert . assertTrue ( tagSelected ) ; } | org . junit . Assert . assertFalse ( tagSelected ) |
testBasicSimilarityDifferentLength ( ) { org . evosuite . testcase . TestCase test1 = new org . evosuite . testcase . DefaultTestCase ( ) ; org . evosuite . testcase . TestCase test2 = new org . evosuite . testcase . DefaultTestCase ( ) ; org . evosuite . testcase . statements . PrimitiveStatement < ? > aInt = new org ... | org . junit . Assert . assertTrue ( ( score <= 0 ) ) |
findInIndex_single ( ) { final net . ripe . db . whois . common . rpsl . RpslObject inetnum = net . ripe . db . whois . common . rpsl . RpslObject . parse ( ( "" + ( ( "inetnum:10.0.0.0<sp>-<sp>10.0.0.255\n" + "netname:netname\n" ) + "mnt-routes:<sp>DEV-MNT<sp>{10.0.0.0/28}\n" ) ) ) ; databaseHelper . addObject ( inetn... | org . junit . Assert . assertThat ( results . size ( ) , org . hamcrest . core . Is . is ( 1 ) ) |
testVraagOpKandidaatVaderZonderOverledenVaderNietNL ( ) { final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView moeder = bouwMoeder ( 20101231 , null , "2" , null , null , null ) ; final java . util . List < nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView > kandidaten = brb... | org . junit . Assert . assertEquals ( 1 , kandidaten . size ( ) ) |
testUpdate ( ) { final org . jboss . narayana . quickstart . jca . model . Customer customer1 = new org . jboss . narayana . quickstart . jca . model . Customer ( 1 , "First<sp>customer<sp>name" ) ; final org . jboss . narayana . quickstart . jca . model . Customer customer2 = new org . jboss . narayana . quickstart . ... | org . junit . Assert . assertEquals ( customer2 , customerDAO . get ( 1 ) ) |
longParams ( ) { final java . lang . String visibilities = "a|b|c" ; final java . lang . String [ ] args = new java . lang . String [ ] { "--ryaInstance" , "" + ( ryaInstance ) , "http://example#bob" 2 , kafka . getKafkaHostname ( ) , "--kafkaPort" , kafka . getKafkaPort ( ) , "--statementsFile" , org . apache . rya . ... | org . junit . Assert . assertEquals ( expected , read ) |
applyMixedCase ( ) { setup ( "name" ) ; org . apache . hadoop . fs . shell . PathData item = new org . apache . hadoop . fs . shell . PathData ( "/directory/path/NaMe" , mockFs . getConf ( ) ) ; "<AssertPlaceHolder>" ; } apply ( org . apache . hadoop . fs . shell . PathData , int ) { java . lang . String name = getPath... | org . junit . Assert . assertEquals ( Result . PASS , name . apply ( item , ( - 1 ) ) ) |
cacheShouldCreateMd5FileName ( ) { com . nostra13 . universalimageloader . cache . disc . naming . Md5FileNameGenerator nameGenerator = new com . nostra13 . universalimageloader . cache . disc . naming . Md5FileNameGenerator ( ) ; com . android . volley . Cache cache = new com . navercorp . volleyextensions . cache . u... | org . junit . Assert . assertThat ( cacheDir . list ( ) [ 0 ] , org . hamcrest . CoreMatchers . is ( expected ) ) |
shouldParseWriteOptionMask ( ) { java . lang . String scriptFragment = "write<sp>option<sp>mask<sp>[0x01<sp>0x02<sp>0x03<sp>0x04]" ; org . kaazing . k3po . lang . internal . parser . ScriptParserImpl parser = new org . kaazing . k3po . lang . internal . parser . ScriptParserImpl ( ) ; org . kaazing . k3po . lang . inte... | org . junit . Assert . assertEquals ( expected , actual ) |
testCorrectnessOfMissingReceivesFrom ( ) { org . apache . taverna . scufl2 . api . core . DataLink dataLink = new org . apache . taverna . scufl2 . api . core . DataLink ( ) ; org . apache . taverna . scufl2 . api . port . OutputWorkflowPort owp = new org . apache . taverna . scufl2 . api . port . OutputWorkflowPort ( ... | org . junit . Assert . assertEquals ( 0 , nullFieldProblems . size ( ) ) |
testPathItemWithVar ( ) { java . lang . String key = "{$request.query.callbackUrl}/data" ; com . ibm . ws . microprofile . openapi . impl . validation . PathItemValidator validator = com . ibm . ws . microprofile . openapi . impl . validation . PathItemValidator . getInstance ( ) ; com . ibm . ws . microprofile . opena... | org . junit . Assert . assertEquals ( 0 , vh . getEventsSize ( ) ) |
testSendWithHeartBeatsAndReceive ( ) { org . apache . activemq . artemis . tests . integration . stomp . util . StompClientConnection newConn = null ; try { org . apache . activemq . artemis . tests . integration . stomp . util . ClientStompFrame frame = conn . createFrame ( Stomp . Commands . CONNECT ) ; frame . addHe... | org . junit . Assert . assertEquals ( 10 , cnt ) |
shouldSetFlushListenerOnWrappedCachingStore ( ) { final org . apache . kafka . streams . state . internals . MeteredKeyValueStoreTest . CachedKeyValueStore cachedKeyValueStore = mock ( org . apache . kafka . streams . state . internals . MeteredKeyValueStoreTest . CachedKeyValueStore . class ) ; expect ( cachedKeyValue... | org . junit . Assert . assertTrue ( metered . setFlushListener ( null , false ) ) |
testImplFactory ( ) { java . io . File wsdlFile = getProtobufRelatedInput ( "ShippingService.wsdl" ) ; java . lang . String [ ] testArgs = new java . lang . String [ ] { "com.ebay.marketplace.blogs.v1.services.suchservice.BlogsSuchServiceV1" 9 , "INTERMEDIATE" 2 , "-mdest" , ( destDir ) + "com.ebay.marketplace.blogs.v1... | org . junit . Assert . assertTrue ( xml . contains ( "com.ebay.marketplace.blogs.v1.services.suchservice.BlogsSuchServiceV1" 6 ) ) |
testManyConcurrentDeferredRequests ( ) { final int NUMBER_OF_THREADS = 10 ; final int REQUESTS_PER_THREAD = 10 ; final java . util . concurrent . atomic . AtomicInteger successCounter = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; java . util . concurrent . ExecutorService executor = java . util . conc... | org . junit . Assert . assertEquals ( ( NUMBER_OF_THREADS * REQUESTS_PER_THREAD ) , successCounter . get ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.