input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testResolveNullKeySet2 ( ) { java . lang . String key = "foo" ; org . kuali . rice . core . impl . config . property . JAXBConfigImpl config = new org . kuali . rice . core . impl . config . property . JAXBConfigImpl ( ) ; config . setProperty ( "foo" , "${bar}" ) ; java . lang . String value = config . resolve ( key ,... | org . junit . Assert . assertEquals ( "" , value ) |
testNoNanos ( ) { io . fabric8 . maven . docker . util . Timestamp ts = new io . fabric8 . maven . docker . util . Timestamp ( "2014-11-24T12:00:00Z" ) ; "<AssertPlaceHolder>" ; } compareTo ( io . fabric8 . maven . docker . log . DefaultLogCallback$LogEntry ) { return timestamp . compareTo ( entry . timestamp ) ; } | org . junit . Assert . assertTrue ( ( ( ref . compareTo ( ts ) ) > 0 ) ) |
shouldReturnAllAsDoIfUndoCommentNotFound ( ) { java . lang . String script = "--<sp>comment\n" + "do<sp>part\n" ; java . lang . String result = readAsString ( new org . apache . ibatis . migration . MigrationReader ( strToInputStream ( script , org . apache . ibatis . migration . MigrationReaderTest . charset ) , org .... | org . junit . Assert . assertEquals ( ( "--<sp>comment\n" + "do<sp>part\n" ) , result ) |
should_return_false_if_array_is_empty ( ) { "<AssertPlaceHolder>" ; } hasOnlyNullElements ( T [ ] ) { org . fest . util . Preconditions . checkNotNull ( array ) ; if ( ! ( org . fest . util . Arrays . hasElements ( array ) ) ) { return false ; } for ( T o : array ) { if ( o != null ) { return false ; } } return true ; ... | org . junit . Assert . assertFalse ( org . fest . util . Arrays . hasOnlyNullElements ( new java . lang . String [ 0 ] ) ) |
elasitcsearch ( ) { java . lang . String filterStr = "itemKey<sp>eq<sp>'itemValue'" ; org . odata4j . expression . BoolCommonExpression filterExp = com . fujitsu . dc . core . odata . DcOptionsQueryParser . parseFilter ( filterStr ) ; org . odata4j . producer . QueryInfo queryInfo = new org . odata4j . producer . Query... | org . junit . Assert . assertEquals ( expected , esQueryHandler . getSource ( ) ) |
whenUsingSimpleMock_thenCorrect ( ) { org . baeldung . mockito . MyList listMock = mock ( org . baeldung . mockito . MyList . class ) ; when ( listMock . add ( anyString ( ) ) ) . thenReturn ( false ) ; boolean added = listMock . add ( org . apache . commons . lang3 . RandomStringUtils . randomAlphabetic ( 6 ) ) ; veri... | org . junit . Assert . assertThat ( added , org . hamcrest . Matchers . is ( false ) ) |
convertPoint_SecondIsRoundNumber_ShouldConvert ( ) { java . lang . String wkt = "POINT(12.2<sp>13)" ; java . lang . String geoJson = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . toGeoJson ( wkt ) ; java . lang . String expectedGeoJson = "{\"type\":\"Point\",<sp>\"coordinates\":<sp>[12.2,13]}" ; "<AssertPlac... | org . junit . Assert . assertEquals ( expectedGeoJson , geoJson ) |
testGetColumnCountNativeNull ( ) { org . pentaho . platform . plugin . services . connections . sql . SQLResultSet resultSet = new org . pentaho . platform . plugin . services . connections . sql . SQLResultSet ( null , nativeConnection ) ; "<AssertPlaceHolder>" ; } getColumnCount ( ) { try { return nativeMetaData . ge... | org . junit . Assert . assertEquals ( 0 , resultSet . getColumnCount ( ) ) |
test_GetEditBox_By_AutomationId ( ) { when ( element . findFirst ( mmarquee . automation . BaseAutomationTest . isTreeScope ( TreeScope . Descendants ) , any ( ) ) ) . thenReturn ( targetElement ) ; mmarquee . automation . controls . AutomationEditBox editBox = spyWndw . getEditBox ( mmarquee . automation . controls . ... | org . junit . Assert . assertEquals ( targetElement , editBox . getElement ( ) ) |
testValueParsing ( ) { java . math . BigDecimal converted = converter . convertToModel ( "10" , java . math . BigDecimal . class , null ) ; java . math . BigDecimal expected = new java . math . BigDecimal ( 10 ) ; "<AssertPlaceHolder>" ; } convertToModel ( java . lang . Enum , java . lang . Class , java . util . Locale... | org . junit . Assert . assertEquals ( expected , converted ) |
testAnyScriptReturnedNull ( ) { java . lang . Object result = v8 . executeScript ( "null;" ) ; "<AssertPlaceHolder>" ; } executeScript ( java . lang . String ) { return executeScript ( script , null , 0 ) ; } | org . junit . Assert . assertNull ( result ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . tools . service . builder . test . model . UADPartialEntry . class , _dynamicQueryClassLoader ) ... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
wrongTypeBeadsItem ( ) { org . sejda . sambox . pdmodel . PDPage victim = new org . sejda . sambox . pdmodel . PDPage ( ) ; org . sejda . sambox . cos . COSArray beads = new org . sejda . sambox . cos . COSArray ( org . sejda . sambox . cos . COSNumber . get ( "2" ) ) ; victim . getCOSObject ( ) . setItem ( COSName . B... | org . junit . Assert . assertTrue ( victim . getThreadBeads ( ) . isEmpty ( ) ) |
testStringDeserialization ( ) { com . owlike . genson . Genson genson = createFormatterGenson ( ) ; java . time . Duration duration = java . time . Duration . ofSeconds ( 123 , 456 ) ; "<AssertPlaceHolder>" ; } deserialize ( com . owlike . genson . stream . ObjectReader , com . owlike . genson . Context ) { T obj ; if ... | org . junit . Assert . assertEquals ( duration , genson . deserialize ( duration . toString ( ) , java . time . Duration . class ) ) |
streamToNodeTest ( ) { org . w3c . dom . Node n = org . exist . xqj . Marshaller . streamToNode ( org . exist . xqj . MarshallerTest . TEST_DOC ) ; java . io . StringWriter writer = new java . io . StringWriter ( ) ; new org . exist . util . serializer . SAXSerializer ( writer , new java . util . Properties ( ) ) ; "<A... | org . junit . Assert . assertEquals ( "test" , n . getLocalName ( ) ) |
testNoDatapoints ( ) { java . util . List < com . spotify . heroic . aggregation . simple . FilterableMetrics < java . lang . Integer > > metrics = java . util . Arrays . asList ( new com . spotify . heroic . aggregation . simple . FilterableMetrics ( null , ( ) -> com . spotify . heroic . metric . MetricCollection . p... | org . junit . Assert . assertEquals ( filter . filter ( metrics ) . size ( ) , 0 ) |
shouldInValidateWithEmptyStringAuth ( ) { final uk . gov . gchq . gaffer . federatedstore . FederatedAccess access = new uk . gov . gchq . gaffer . federatedstore . FederatedAccess . Builder ( ) . graphAuths ( "" ) . build ( ) ; "<AssertPlaceHolder>" ; } isValidToExecute ( uk . gov . gchq . gaffer . user . User ) { ret... | org . junit . Assert . assertFalse ( access . isValidToExecute ( user ) ) |
testGenerateAnyFromDynAny ( ) { java . lang . String msg ; org . omg . CORBA . Any any = null ; org . omg . CORBA . TypeCode tc = null ; org . omg . DynamicAny . DynStruct dynAny = null ; org . omg . DynamicAny . DynStruct dynAny2 = null ; tc = org . jacorb . test . EmptyExceptionHelper . type ( ) ; dynAny = createDynA... | org . junit . Assert . assertTrue ( msg , dynAny . equal ( dynAny2 ) ) |
testDouble3 ( ) { java . lang . Double d = executeBackAndForth ( Double . MIN_VALUE , testcase . function . Double . class ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . name ; } | org . junit . Assert . assertEquals ( java . lang . String . valueOf ( Double . MIN_VALUE ) , d . toString ( ) ) |
test_from_TemporalAccessor_DayOfMonth ( ) { org . threeten . extra . DayOfMonth dom = org . threeten . extra . DayOfMonth . of ( 6 ) ; "<AssertPlaceHolder>" ; } from ( java . time . temporal . TemporalAccessor ) { if ( temporal instanceof org . threeten . extra . DayOfMonth ) { return ( ( org . threeten . extra . DayOf... | org . junit . Assert . assertEquals ( dom , org . threeten . extra . DayOfMonth . from ( dom ) ) |
shouldRunCargoCommandsWithEnvVariablesAndFinalArgs ( ) { java . lang . ProcessBuilder expectedCommand = argThat ( isProcess ( "/bin/bash" , "-lc" , "/path/to/cargo<sp>clean<sp>--verbose<sp>&&<sp>/path/to/cargo<sp>test<sp>mytest<sp>--jobs<sp>1<sp>--verbose<sp>--<sp>--nocapture" ) . inDir ( projectDir ) . withEnvVar ( "R... | org . junit . Assert . assertEquals ( commandFuture , result ) |
test1 ( ) { java . lang . String code = "a=2" ; java . lang . String expected = "2<sp>0<sp>MSTORE" ; org . ethereum . serpent . SerpentParser parser = org . ethereum . serpent . ParserUtils . getParser ( org . ethereum . serpent . SerpentLexer . class , org . ethereum . serpent . SerpentParser . class , code ) ; org . ... | org . junit . Assert . assertEquals ( expected , result ) |
testStreamPartitionEqual ( ) { org . apache . eagle . alert . engine . coordinator . StreamPartition partition1 = new org . apache . eagle . alert . engine . coordinator . StreamPartition ( ) ; partition1 . setStreamId ( "unittest" ) ; partition1 . setColumns ( java . util . Arrays . asList ( "col1" , "col2" ) ) ; org ... | org . junit . Assert . assertTrue ( partition1 . equals ( partition2 ) ) |
testVerifyFailsForMissingCorrelationId ( ) { final org . apache . qpid . proton . message . Message msg = io . vertx . proton . ProtonHelper . message ( ) ; msg . setReplyTo ( "reply" ) ; msg . setBody ( new org . apache . qpid . proton . amqp . messaging . AmqpValue ( org . eclipse . hono . service . credentials . Cre... | org . junit . Assert . assertFalse ( filterResult ) |
testForVarCharArrayForOddNumberWithIndex3 ( ) { java . lang . String [ ] strArr = new java . lang . String [ 5 ] ; strArr [ 0 ] = "abx" ; strArr [ 1 ] = "ereref" ; strArr [ 2 ] = "random" ; strArr [ 3 ] = "random12" ; strArr [ 4 ] = null ; org . apache . phoenix . schema . types . PhoenixArray arr = org . apache . phoe... | org . junit . Assert . assertEquals ( "" , org . apache . hadoop . hbase . util . Bytes . toString ( res ) ) |
testGetTableBlackList ( ) { org . apache . kylin . metadata . acl . TableACL tableACL = new org . apache . kylin . metadata . acl . TableACL ( ) ; tableACL . add ( "u1" , "t1" , MetadataConstants . TYPE_USER ) ; tableACL . add ( "u1" , "t2" , MetadataConstants . TYPE_USER ) ; tableACL . add ( "u2" , "t1" , MetadataCons... | org . junit . Assert . assertEquals ( com . google . common . collect . Sets . newHashSet ( "t1" , "t2" , "t3" , "t4" , "t5" , "t6" ) , tableBlackList ) |
testCeilDecimalExpressionNoop ( ) { com . salesforce . phoenix . expression . LiteralExpression bd = com . salesforce . phoenix . expression . LiteralExpression . newConstant ( 5 , PDataType . INTEGER ) ; com . salesforce . phoenix . expression . Expression rde = com . salesforce . phoenix . expression . function . Cei... | org . junit . Assert . assertEquals ( rde , bd ) |
testMetBuitenlander ( ) { nl . bzk . brp . business . dto . bijhouding . HuwelijkBericht bericht = bouwHuwelijkBerichtMetActies ( bouwHuwelijkEnLijstVanActies ( man , vrouw , vrouw , buitenlander ) ) ; java . util . List < nl . bzk . brp . model . validatie . Melding > meldingen = bedrijfsregel . executeer ( bericht ) ... | org . junit . Assert . assertEquals ( 1 , meldingen . size ( ) ) |
getIfAbsentPutWithKey ( ) { com . gs . collections . api . block . function . primitive . BooleanFunction < java . lang . Integer > function = ( anObject ) -> ( anObject == null ) || ( ( anObject & 1 ) == 0 ) ; "<AssertPlaceHolder>" ; } newWithKeysValues ( K , V ) { return new com . gs . collections . impl . bimap . mu... | org . junit . Assert . assertTrue ( this . newWithKeysValues ( 0 , true ) . getIfAbsentPutWithKey ( 0 , function ) ) |
testHashCode ( ) { version = new org . apache . servicecomb . serviceregistry . version . Version ( s1 , s1 , s1 , s1 ) ; "<AssertPlaceHolder>" ; } getVersion ( ) { return version ; } | org . junit . Assert . assertEquals ( version . getVersion ( ) . hashCode ( ) , version . hashCode ( ) ) |
returnsTrueIfBothDelegatesReturnTrue ( ) { when ( firstDelegate . handle ( result ) ) . thenReturn ( true ) ; when ( secondDelegate . handle ( result ) ) . thenReturn ( true ) ; "<AssertPlaceHolder>" ; } handle ( org . atlasapi . equiv . results . EquivalenceResults ) { org . atlasapi . equiv . results . description . ... | org . junit . Assert . assertThat ( handler . handle ( result ) , org . hamcrest . core . Is . is ( true ) ) |
testGetVectorDataProviderForReadWhenExists ( ) { org . mrgeo . data . vector . VectorDataProvider dp = org . mrgeo . data . DataProviderFactory . getVectorDataProvider ( org . mrgeo . data . DataProviderFactoryTest . test_tsv , AccessMode . READ , providerProperties ) ; "<AssertPlaceHolder>" ; } getVectorDataProvider (... | org . junit . Assert . assertNotNull ( dp ) |
testDoubleDrop ( ) { com . j256 . ormlite . dao . Dao < com . j256 . ormlite . table . TableUtilsTest . LocalFoo , java . lang . Integer > fooDao = createDao ( com . j256 . ormlite . table . TableUtilsTest . LocalFoo . class , false ) ; createTable ( com . j256 . ormlite . table . TableUtilsTest . LocalFoo . class , fa... | org . junit . Assert . assertEquals ( 0 , fooDao . queryForAll ( ) . size ( ) ) |
shouldUpdateRecurrenceSourceInterval ( ) { com . calendarfx . model . Interval oldInterval = recurrenceSourceEntry . getInterval ( ) ; com . calendarfx . model . Interval newInterval = new com . calendarfx . model . Interval ( java . time . LocalDate . now ( ) . plusDays ( 1 ) , java . time . LocalTime . of ( 10 , 0 ) ... | org . junit . Assert . assertThat ( newInterval , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . not ( org . hamcrest . Matchers . equalTo ( oldInterval ) ) ) ) |
testFindByEcfIdAndVersion ( ) { java . util . List < org . kaaproject . kaa . server . common . dao . model . sql . ApplicationEventFamilyMap > applicationEventFamilyMaps = generateApplicationEventFamilyMap ( null , null , null , 2 , true ) ; org . kaaproject . kaa . server . common . dao . model . sql . ApplicationEve... | org . junit . Assert . assertEquals ( applicationEventFamilyMaps , found ) |
selectIndexPromises ( ) { io . trane . future . Promise < java . lang . Integer > p1 = io . trane . future . Promise . apply ( ) ; io . trane . future . Promise < java . lang . Integer > p2 = io . trane . future . Promise . apply ( ) ; io . trane . future . Future < java . lang . Integer > future = io . trane . future ... | org . junit . Assert . assertEquals ( new java . lang . Integer ( 1 ) , get ( future ) ) |
testVraagOpKandidaatVaderZonderOverledenVaderNietNL ( ) { java . util . List < nl . bzk . brp . model . objecttype . operationeel . BetrokkenheidModel > echtgenoten = java . util . Arrays . asList ( maakBetrokkenheden ( 20101231 , null , ( ( short ) ( 2 ) ) ) ) ; org . mockito . Mockito . when ( relatieRepository . haa... | org . junit . Assert . assertEquals ( 1 , kandidaten . size ( ) ) |
withOneStep ( ) { "<AssertPlaceHolder>" ; } countWays ( int ) { if ( steps == 0 ) return 1 ; else if ( steps == 1 ) return 1 ; else if ( steps == 2 ) return 2 ; else if ( steps == 3 ) return 4 ; int a = 1 ; int b = 2 ; int c = 4 ; int ways = 0 ; for ( int i = 4 ; i <= steps ; i ++ ) { ways = ( a + b ) + c ; a = b ; b =... | org . junit . Assert . assertEquals ( 1 , s . countWays ( 1 ) ) |
shouldNotSplitSingleOperatorPipeline ( ) { when ( regionExecPlan . getOperatorCountByPipelineStartIndex ( pipelineId . getPipelineStartIndex ( ) ) ) . thenReturn ( 1 ) ; when ( regionExecPlan . withSplitPipeline ( singletonList ( 0 ) ) ) . thenReturn ( newRegionExecPlan ) ; final cs . bilkent . joker . engine . adaptat... | org . junit . Assert . assertNull ( action ) |
supports_creating_inet6num ( ) { when ( update . getAction ( ) ) . thenReturn ( Action . CREATE ) ; when ( update . getType ( ) ) . thenReturn ( ObjectType . INET6NUM ) ; "<AssertPlaceHolder>" ; } supports ( net . ripe . db . whois . update . domain . PreparedUpdate ) { return ( update . getAction ( ) . equals ( Action... | org . junit . Assert . assertThat ( subject . supports ( update ) , org . hamcrest . core . Is . is ( true ) ) |
testBuildWithParameters ( ) { org . lnu . is . domain . department . Department department = new org . lnu . is . domain . department . Department ( ) ; org . lnu . is . domain . address . type . AddressType addressType = new org . lnu . is . domain . address . type . AddressType ( ) ; org . lnu . is . domain . admin .... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
givenCapturingGroupAndWrongInput_whenMatchFailsWithBackReference_thenCorrect ( ) { int matches = com . baeldung . java . regex . RegexUnitTest . runTest ( "(\\d\\d)\\1" , "1213" ) ; "<AssertPlaceHolder>" ; } runTest ( java . lang . String , java . lang . String ) { com . baeldung . java . regex . RegexUnitTest . patter... | org . junit . Assert . assertFalse ( ( matches > 0 ) ) |
addPropertyKOAlreadyExist ( ) { testedStore . createProperty ( new org . ff4j . property . PropertyLogLevel ( "log" , org . ff4j . property . PropertyLogLevel . LogLevel . DEBUG ) ) ; "<AssertPlaceHolder>" ; testedStore . createProperty ( new org . ff4j . property . PropertyLogLevel ( "log" , org . ff4j . property . Pr... | org . junit . Assert . assertTrue ( testedStore . existProperty ( "log" ) ) |
testParentInsertableColumnNames ( ) { try { java . lang . String [ ] columnNames = getInsertableColumnNames ( parentClass ) ; java . util . List < java . lang . String > actualColumnNames = java . util . Arrays . asList ( columnNames ) ; java . util . Collections . sort ( actualColumnNames ) ; java . util . List < java... | org . junit . Assert . assertEquals ( actualColumnNames , expectedColumnNames ) |
testGetType ( ) { org . apache . hadoop . hbase . Cell c = org . mockito . Mockito . mock ( org . apache . hadoop . hbase . Cell . class ) ; org . mockito . Mockito . when ( c . getType ( ) ) . thenCallRealMethod ( ) ; for ( org . apache . hadoop . hbase . Cell . Type type : Cell . Type . values ( ) ) { org . mockito .... | org . junit . Assert . assertEquals ( type , c . getType ( ) ) |
test ( ) { final java . lang . Long userId = 42L ; java . util . List < org . eurekastreams . server . domain . stream . StreamScope > result = sut . execute ( userId ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( org . eurekastreams . server . service . utility . Prope... | org . junit . Assert . assertEquals ( 2 , result . size ( ) ) |
groupCreateSubColl ( ) { final org . xmldb . api . base . Collection test = org . xmldb . api . DatabaseManager . getCollection ( ( ( getBaseUri ( ) ) + "/db/securityTest1" ) , "test2" , "test2" ) ; final org . xmldb . api . modules . CollectionManagementService cms = ( ( org . xmldb . api . modules . CollectionManagem... | org . junit . Assert . assertNotNull ( newCol ) |
testNew ( ) { jp . co . future . uroborosql . coverage . Ranges ranges = new jp . co . future . uroborosql . coverage . Ranges ( java . util . Arrays . asList ( new jp . co . future . uroborosql . coverage . Range ( 2 , 3 ) , new jp . co . future . uroborosql . coverage . Range ( 4 , 5 ) ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( ranges , org . hamcrest . CoreMatchers . is ( new jp . co . future . uroborosql . coverage . Ranges ( 2 , 5 ) ) ) |
newSetWithIterable ( ) { org . eclipse . collections . api . set . MutableSet < java . lang . Integer > integers = org . eclipse . collections . impl . set . mutable . UnifiedSet . newSet ( org . eclipse . collections . impl . list . Interval . oneTo ( 3 ) ) ; "<AssertPlaceHolder>" ; } newSetWith ( int , int , int ) { ... | org . junit . Assert . assertEquals ( org . eclipse . collections . impl . set . mutable . UnifiedSet . newSetWith ( 1 , 2 , 3 ) , integers ) |
listVisibilityOptionsForwardsCalls ( ) { org . phenotips . data . permissions . EntityPermissionsManager internal = this . mocker . getInstance ( org . phenotips . data . permissions . EntityPermissionsManager . class ) ; java . util . List < org . phenotips . data . permissions . Visibility > visibilities = new java .... | org . junit . Assert . assertSame ( visibilities , returnedVisibilities ) |
testSerialization ( ) { org . jfree . data . time . FixedMillisecond m1 = new org . jfree . data . time . FixedMillisecond ( ) ; org . jfree . data . time . FixedMillisecond m2 = ( ( org . jfree . data . time . FixedMillisecond ) ( org . jfree . chart . TestUtilities . serialised ( m1 ) ) ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertEquals ( m1 , m2 ) |
testValueEquals ( ) { p2 . codeSamples . NestedTestClasses x = new p2 . codeSamples . NestedTestClasses ( 20 ) ; x . accumulate ( 10 ) ; p2 . codeSamples . NestedTestClasses y = new p2 . codeSamples . NestedTestClasses ( 30 ) ; "<AssertPlaceHolder>" ; } accumulate ( int ) { value = x + ( value ) ; } | org . junit . Assert . assertEquals ( y , x ) |
testAddAllListOfRdn003 ( ) { java . util . LinkedList < javax . naming . ldap . Rdn > test = new java . util . LinkedList < javax . naming . ldap . Rdn > ( ) ; javax . naming . ldap . LdapName ln = new javax . naming . ldap . LdapName ( "t=test" ) ; ln . addAll ( test ) ; "<AssertPlaceHolder>" ; } toString ( ) { return... | org . junit . Assert . assertEquals ( "t=test" , ln . toString ( ) ) |
testIsApplicableToFailsOnMalformedXML ( ) { org . eclipse . sw360 . datahandler . thrift . attachments . AttachmentContent content = new org . eclipse . sw360 . datahandler . thrift . attachments . AttachmentContent ( ) . setId ( "A1" ) . setFilename ( "a.xml" ) . setContentType ( "application/xml" ) ; when ( connector... | org . junit . Assert . assertFalse ( parser . isApplicableTo ( attachment , new org . eclipse . sw360 . datahandler . thrift . users . User ( ) , new org . eclipse . sw360 . datahandler . thrift . projects . Project ( ) ) ) |
getLineBreak_A$_FORCE_LF ( ) { org . junithelper . core . config . Configuration config = new org . junithelper . core . config . Configuration ( ) ; config . lineBreakPolicy = org . junithelper . core . config . LineBreakPolicy . forceLF ; org . junithelper . core . meta . CurrentLineBreak currentLineBreak = org . jun... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
relationships ( ) { io . cereebro . snitch . ComponentRelationshipsProperties c = new io . cereebro . snitch . ComponentRelationshipsProperties ( ) ; io . cereebro . snitch . DependencyProperties d = createDependency ( "iceman" , "superhero" ) ; io . cereebro . snitch . ConsumerProperties consumer = createConsumer ( "g... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldSuccessfullyExtractUuidFromPath ( ) { java . lang . String uuid = org . unitedinternet . cosmo . dao . external . UuidExternalGenerator . get ( ) . getNext ( ) ; java . lang . String path = ( ( ( ( java . util . UUID . randomUUID ( ) . toString ( ) ) + "/" ) + uuid ) + "/" ) + ( java . util . UUID . randomUUID ( ... | org . junit . Assert . assertEquals ( uuid , extractedUuid ) |
testIsValidSecurityZoneForDeleteWithWrongIdReturnFalse ( ) { org . apache . ranger . plugin . model . RangerSecurityZone suppliedSecurityZone = getRangerSecurityZone ( ) ; org . mockito . Mockito . when ( _store . getSecurityZone ( suppliedSecurityZone . getId ( ) ) ) . thenReturn ( null ) ; java . util . List < org . ... | org . junit . Assert . assertFalse ( isValid ) |
batchForEachEntry_emptySet ( ) { org . eclipse . collections . impl . math . Sum sum5 = new org . eclipse . collections . impl . math . IntegerSum ( 0 ) ; org . eclipse . collections . impl . parallel . BatchIterable < Map . Entry < java . lang . Integer , java . lang . Integer > > empty = ( ( org . eclipse . collectio... | org . junit . Assert . assertEquals ( 0 , sum5 . getValue ( ) ) |
testRollbackCreateTableDeletesExistentTable ( ) { org . apache . accumulo . core . client . mock . MockInstance inst = new org . apache . accumulo . core . client . mock . MockInstance ( test . getMethodName ( ) ) ; org . apache . accumulo . core . client . Connector conn = inst . getConnector ( "root" , new org . apac... | org . junit . Assert . assertFalse ( conn . tableOperations ( ) . exists ( tableName ) ) |
testIsUrlParameter_1 ( ) { final boolean result = org . apache . shindig . gadgets . oauth2 . persistence . OAuth2ClientTest . client1 . isUrlParameter ( ) ; "<AssertPlaceHolder>" ; } isUrlParameter ( ) { return this . urlParameter ; } | org . junit . Assert . assertFalse ( result ) |
tesNegativeInfinity ( ) { org . hipparchus . linear . ArrayRealVector c = new org . hipparchus . linear . ArrayRealVector ( new double [ ] { Double . NEGATIVE_INFINITY , Double . NEGATIVE_INFINITY , Double . NEGATIVE_INFINITY } ) ; java . lang . String expected = "{(-Infinity);<sp>(-Infinity);<sp>(-Infinity)}" ; java .... | org . junit . Assert . assertEquals ( expected , actual ) |
testWriteShort ( ) { com . liferay . portal . kernel . io . Serializer serializer = new com . liferay . portal . kernel . io . Serializer ( ) ; java . nio . ByteBuffer byteBuffer = java . nio . ByteBuffer . allocate ( ( ( com . liferay . portal . kernel . io . SerializerTest . _COUNT ) * 2 ) ) ; byteBuffer . order ( By... | org . junit . Assert . assertArrayEquals ( byteBuffer . array ( ) , serializerByteBuffer . array ( ) ) |
errorPathTestCacheNotRefreshedSinceAllowedStaleTime ( ) { java . util . Calendar currentTime = java . util . GregorianCalendar . getInstance ( ) ; currentTime . set ( 2017 , 2 , 5 , 3 , 30 ) ; when ( timeService . getCurrentTime ( ) ) . thenReturn ( currentTime . getTime ( ) ) ; java . util . Calendar currentTimeMinus3... | org . junit . Assert . assertThat ( result . isHealthy ( ) , org . hamcrest . core . Is . is ( false ) ) |
whenResourceIteratorIsCreated_andRemoveIsCalled_thenTheIteratorIsEmpty ( ) { rest . RestResource jr = new rest . RestResource ( rest . RestResourceIteratorTest . ISSUE_KEY , rest . RestResourceIteratorTest . BASE_URL ) ; java . util . List < rest . RestResource > jrList = new java . util . ArrayList < rest . RestResour... | org . junit . Assert . assertTrue ( ( ! ( it . hasNext ( ) ) ) ) |
testCharArray ( ) { char [ ] arr = new char [ ] { 10 , 20 , 30 } ; "<AssertPlaceHolder>" ; } marshalUnmarshal ( java . lang . Object ) { org . apache . ignite . internal . marshaller . optimized . OptimizedObjectOutputStream out = null ; org . apache . ignite . internal . marshaller . optimized . OptimizedObjectInputSt... | org . junit . Assert . assertArrayEquals ( arr , marshalUnmarshal ( arr ) ) |
testQueryByVersionTagLike ( ) { java . util . List < org . camunda . bpm . engine . repository . DecisionDefinition > decisionDefinitionList = repositoryService . createDecisionDefinitionQuery ( ) . versionTagLike ( "1%" ) . list ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( ( ( historicProcessInstanceIds . size ... | org . junit . Assert . assertEquals ( 2 , decisionDefinitionList . size ( ) ) |
shouldDelegateEntrySetMethodToPropertiesInstance ( ) { final uk . gov . gchq . gaffer . data . element . Properties properties = mock ( uk . gov . gchq . gaffer . data . element . Properties . class ) ; final uk . gov . gchq . gaffer . data . element . LazyProperties lazyProperties = new uk . gov . gchq . gaffer . data... | org . junit . Assert . assertSame ( expectedEntrySet , entrySet ) |
insert_edge_should_succeed ( ) { org . neo4j . talend . Neo4jBatchInserterNode nodeInserter = getNeo4jBatchInserterNode ( false ) ; java . util . List < java . lang . String > columns = org . neo4j . talend . DummyTalendPojo . getColumnList ( ) ; for ( int i = 0 ; i < 100 ; i ++ ) { org . neo4j . talend . DummyTalendPo... | org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 100 ) , result ) |
nonConversationalEventWithoutContext ( ) { final java . lang . String convSessionId = org . jboss . errai . cdi . server . events . EventDispatcher . getConversationalSessionId ( org . jboss . errai . cdi . server . events . MyNonConversationalEvent . class ) ; "<AssertPlaceHolder>" ; } getConversationalSessionId ( jav... | org . junit . Assert . assertNull ( convSessionId ) |
whenRequestingNeighborhoodOfTargetJob_sizeShouldBe4 ( ) { com . graphhopper . jsprit . core . algorithm . ruin . JobNeighborhoodsImplWithCapRestriction jn = new com . graphhopper . jsprit . core . algorithm . ruin . JobNeighborhoodsImplWithCapRestriction ( vrp , jobDistance , 4 ) ; jn . initialise ( ) ; java . util . I... | org . junit . Assert . assertEquals ( 4 , services . size ( ) ) |
shouldJsonSerialiseWithNoKeyFunctions ( ) { java . lang . String json = "{\n" + ( "<sp>\"class\":<sp>\"uk.gov.gchq.gaffer.store.operation.handler.join.match.KeyFunctionMatch\"\n" + "}" ) ; uk . gov . gchq . gaffer . store . operation . handler . join . match . KeyFunctionMatch match = new uk . gov . gchq . gaffer . sto... | org . junit . Assert . assertEquals ( match , uk . gov . gchq . gaffer . jsonserialisation . JSONSerialiser . deserialise ( json , uk . gov . gchq . gaffer . store . operation . handler . join . match . KeyFunctionMatch . class ) ) |
testLoadSpecificWorksheet ( ) { final org . drools . decisiontable . SpreadsheetCompiler converter = new org . drools . decisiontable . SpreadsheetCompiler ( ) ; final java . io . InputStream stream = this . getClass ( ) . getResourceAsStream ( "/data/MultiSheetDST.xls" ) ; final java . lang . String drl = converter . ... | org . junit . Assert . assertNotNull ( drl ) |
testMultiply ( ) { com . itextpdf . kernel . geom . Matrix m1 = new com . itextpdf . kernel . geom . Matrix ( 2 , 3 , 4 , 5 , 6 , 7 ) ; com . itextpdf . kernel . geom . Matrix m2 = new com . itextpdf . kernel . geom . Matrix ( 8 , 9 , 10 , 11 , 12 , 13 ) ; com . itextpdf . kernel . geom . Matrix shouldBe = new com . it... | org . junit . Assert . assertEquals ( shouldBe , rslt ) |
testGetHypervisorsBulkEmpty ( ) { java . lang . String hypervisorid = "hypervisor" ; org . candlepin . model . Consumer consumer = new org . candlepin . model . Consumer ( "testConsumer" , "testUser" , owner , ct ) ; org . candlepin . model . HypervisorId hypervisorId = new org . candlepin . model . HypervisorId ( hype... | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
testGetMissingRequiredPropertiesWithNoDefaultAndAbsentCustom ( ) { com . google . cloud . tools . eclipse . dataflow . core . launcher . options . PipelineOptionsProperty property = new com . google . cloud . tools . eclipse . dataflow . core . launcher . options . PipelineOptionsProperty ( "foo" , false , true , java ... | org . junit . Assert . assertTrue ( missingProperties . getMissingProperties ( ) . contains ( property ) ) |
testIsTimeoutFlag ( ) { org . openscience . cdk . smsd . algorithm . rgraph . CDKRMapHandler instance = new org . openscience . cdk . smsd . algorithm . rgraph . CDKRMapHandler ( ) ; boolean expResult = true ; instance . setTimeoutFlag ( true ) ; boolean result = instance . isTimeoutFlag ( ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertEquals ( expResult , result ) |
testLayout2 ( ) { edu . cmu . tetrad . graph . Dag dag = new edu . cmu . tetrad . graph . Dag ( ) ; edu . cmu . tetrad . graph . GraphNode x1 = new edu . cmu . tetrad . graph . GraphNode ( "X1" ) ; edu . cmu . tetrad . graph . GraphNode x2 = new edu . cmu . tetrad . graph . GraphNode ( "X2" ) ; x1 . setCenter ( 40 , 5 ... | org . junit . Assert . assertEquals ( dag , dag2 ) |
testTocNumberOfPagesNoToc ( ) { org . sejda . model . parameter . MergeParameters params = new org . sejda . model . parameter . MergeParameters ( ) ; params . setTableOfContentsPolicy ( ToCPolicy . NONE ) ; params . addInput ( new org . sejda . model . input . PdfMergeInput ( mock ( org . sejda . model . input . PdfFi... | org . junit . Assert . assertEquals ( 0 , victim . tocNumberOfPages ( ) ) |
testFormatLogEventStringBuilderIso8601 ( ) { final org . apache . logging . log4j . core . LogEvent event = new org . apache . logging . log4j . core . pattern . DatePatternConverterTest . MyLogEvent ( ) ; final org . apache . logging . log4j . core . pattern . DatePatternConverter converter = org . apache . logging . ... | org . junit . Assert . assertEquals ( expected , sb . toString ( ) ) |
testGenerateLocalizedXLIFFRemoveUntranslatedOnlyApproved ( ) { createTestData ( ) ; com . box . l10n . mojito . service . tm . TMTextUnit tmTextUnit1 = tmService . addTMTextUnit ( tmId , assetId , "application_name" , "Application<sp>Name" , "This<sp>text<sp>is<sp>shown<sp>in<sp>the<sp>start<sp>screen<sp>of<sp>the<sp>a... | org . junit . Assert . assertEquals ( removeLeadingAndTrailingSpacesOnEveryLine ( expectedLocalizedXLIFF ) , removeLeadingAndTrailingSpacesOnEveryLine ( localizedAsset ) ) |
setExternalLinkWhenResourceGroupIsNullShouldNotSetLinkInGroup ( ) { java . lang . String externalLink = "externalLink" ; resourceEntity = new ch . puzzle . itc . mobiliar . builders . ResourceEntityBuilder ( ) . build ( ) ; resourceEntity . setResourceGroup ( null ) ; resourceEntity . setExternalLink ( externalLink ) ;... | org . junit . Assert . assertNull ( resourceEntity . getExternalLink ( ) ) |
testSoqlCompilation ( ) { net . sourceforge . pmd . lang . apex . ast . ApexParser parser = new net . sourceforge . pmd . lang . apex . ast . ApexParser ( new net . sourceforge . pmd . lang . apex . ApexParserOptions ( ) ) ; net . sourceforge . pmd . lang . apex . ast . ApexNode < apex . jorje . semantic . ast . compil... | org . junit . Assert . assertNotNull ( cu ) |
testGetJavaScriptOption ( ) { org . odlabs . wiquery . core . effects . AnimateDuration animateDuration = new org . odlabs . wiquery . core . effects . AnimateDuration ( 500 ) ; java . lang . String expectedJavascript = "500" ; java . lang . String generatedJavascript = animateDuration . getJavascriptOption ( ) . toStr... | org . junit . Assert . assertEquals ( generatedJavascript , expectedJavascript ) |
shouldFindConfigurableProviders ( ) { victim = ro . isdc . wro . util . provider . ProviderFinder . of ( ro . isdc . wro . util . provider . ConfigurableProvider . class ) ; "<AssertPlaceHolder>" ; } find ( ) { final java . util . List < T > providers = new java . util . ArrayList < T > ( ) ; try { final java . util . ... | org . junit . Assert . assertEquals ( 1 , victim . find ( ) . size ( ) ) |
testArgumentToString ( ) { java . lang . String actual = org . easymock . internal . ArgumentToString . argumentToString ( Boolean . TRUE ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( values . isEmpty ( ) ) { return "Nothing<sp>captured<sp>yet" ; } if ( ( values . size ( ) ) == 1 ) { return java . lang . String . v... | org . junit . Assert . assertEquals ( Boolean . TRUE . toString ( ) , actual ) |
shouldNotThrowFastNoSuchElementException ( ) { try { g . V ( ) . has ( "foo" ) . next ( ) ; } catch ( java . util . NoSuchElementException e ) { "<AssertPlaceHolder>" ; } } next ( ) { return this . iterator . next ( ) . entrySet ( ) . stream ( ) . collect ( java . util . stream . Collectors . toMap ( java . util . Map ... | org . junit . Assert . assertEquals ( java . util . NoSuchElementException . class , e . getClass ( ) ) |
testGetAllUsers ( ) { com . google . appengine . sparkdemo . User [ ] users = com . google . appengine . sparkdemo . UserControllerTest . getAllUsers ( ) ; "<AssertPlaceHolder>" ; } getAllUsers ( ) { return new com . google . gson . Gson ( ) . fromJson ( com . google . appengine . sparkdemo . UserControllerTest . execu... | org . junit . Assert . assertTrue ( ( ( users . length ) <= 1 ) ) |
testServiceExists ( ) { createService ( ProvisioningStatus . COMPLETED , org . oscm . app . v2_0 . service . APPConcurrencyBeanIT . CTRL_ID , "appId1" , "sub1" ) ; boolean exists = exists ( org . oscm . app . v2_0 . service . APPConcurrencyBeanIT . CTRL_ID , "appId1" ) ; "<AssertPlaceHolder>" ; } exists ( java . lang .... | org . junit . Assert . assertTrue ( exists ) |
testInvalidUrl ( ) { slash . navigation . download . Download download = manager . queueForDownload ( "Does<sp>not<sp>exist" , ( ( slash . navigation . download . DownloadManagerIT . DOWNLOAD ) + "doesntexist.txt" ) , slash . navigation . download . Copy , new slash . navigation . download . FileAndChecksum ( target , ... | org . junit . Assert . assertEquals ( slash . navigation . download . Failed , download . getState ( ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . dynamic . data . mapping . model . DDMTemplate newDDMTemplate = addDDMTemplate ( ) ; com . liferay . dynamic . data . mapping . model . DDMTemplate existingDDMTemplate = _persistence . fetchByPrimaryKey ( newDDMTemplate . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertEquals ( existingDDMTemplate , newDDMTemplate ) |
findIssueTrackerTaskShouldSucceed ( ) { at . ac . tuwien . ifs . tita . entity . IssueTrackerTask itt = taskDao . findIssueTrackerTask ( 1L , 1L , 97L , 27L ) ; "<AssertPlaceHolder>" ; } findIssueTrackerTask ( java . lang . Long , java . lang . Long , java . lang . Long , java . lang . Long ) { java . lang . String que... | org . junit . Assert . assertNotNull ( itt ) |
test_DirectQuery_vs_GuaranteedBufferedIterator ( ) { System . out . println ( "Test:<sp>test_DirectQuery_vs_GuaranteedBufferedIterator<sp>======================================================================" ) ; final java . util . Properties ctx = org . compiere . util . Env . getCtx ( ) ; final java . lang . String... | org . junit . Assert . assertEquals ( expectedTableNames , actualTableNames ) |
testPurgeDataWithFilter ( ) { try { executeAction ( "shp" ) ; long firstRun = getRecordCountFromDatabase ( "test" ) ; configuration . setEcqlFilter ( "LAND_KM<sp><<sp>3000<sp>OR<sp>STATE_NAME<sp>=<sp>'California'" ) ; configuration . setPurgeData ( true ) ; executeAction ( "shp" ) ; "<AssertPlaceHolder>" ; } catch ( it... | org . junit . Assert . assertEquals ( getRecordCountFromDatabase ( "test" ) , firstRun ) |
testBinaryContentImplByteArrayValidity ( ) { 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 ) ; byte [ ] contents = bci . getByteArray ( ) ; "<AssertPlaceHolde... | org . junit . Assert . assertArrayEquals ( contents , bci . getByteArray ( ) ) |
testReceive ( ) { org . restcomm . media . core . rtp . secure . NioUdpTransport dtlsTransport = new org . restcomm . media . core . rtp . secure . NioUdpTransport ( org . restcomm . media . core . rtp . secure . NioUdpTransportTest . localChannel ) ; java . lang . String msg = "this<sp>is<sp>data" ; byte [ ] data = ms... | org . junit . Assert . assertEquals ( msg , new java . lang . String ( data ) ) |
shouldFilterByGenerics ( ) { org . springframework . springfaces . FacesContextSetter . setCurrentInstance ( this . facesContext ) ; setupApplicationContext ( this . applicationContext ) ; this . facesWrapperFactoryBeans . put ( "long" , new org . springframework . springfaces . internal . WrapperHandlerTest . LongFace... | org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( 1 ) ) ) |
testAndereIndicatie ( ) { java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > meldingen ; nl . bzk . brp . model . bericht . kern . PersoonBericht persoon = bouwPersoon ( true , true ) ; org . springframework . test . util . ReflectionTestUtils . setField ( persoon . getIndicaties ( ) . iterator ( )... | org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) ) |
getUniqueUserIdWithValidUser ( ) { java . lang . String user = "vmmtestuser" ; java . lang . String uniqueUserId = "cn=vmmtestuser,o=ibm,c=us" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . FATTestCustom . c , "getUniqueUserIdWithValidUser" , "Checking... | org . junit . Assert . assertEquals ( uniqueUserId , com . ibm . ws . security . wim . adapter . ldap . fat . FATTestCustom . servlet . getUniqueUserId ( user ) ) |
preserveTimestampDirCanBeDisabled ( ) { org . springframework . context . annotation . AnnotationConfigApplicationContext context = new org . springframework . context . annotation . AnnotationConfigApplicationContext ( ) ; org . springframework . boot . test . EnvironmentTestUtils . addEnvironment ( context , "preserv... | org . junit . Assert . assertTrue ( ( ! ( properties . isPreserveTimestamp ( ) ) ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.