input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testGetPluralName ( ) { org . apache . ambari . server . api . resources . ViewPermissionResourceDefinition ViewPermissionResourceDefinition = new org . apache . ambari . server . api . resources . ViewPermissionResourceDefinition ( ) ; "<AssertPlaceHolder>" ; } getPluralName ( ) { return "permissions" ; } | org . junit . Assert . assertEquals ( "permissions" , ViewPermissionResourceDefinition . getPluralName ( ) ) |
equals_additionalTimeToWaitForLockDifferent_returnsFalse ( ) { com . amazonaws . services . dynamodbv2 . AcquireLockOptions left = createLockOptions ( ) ; com . amazonaws . services . dynamodbv2 . AcquireLockOptions right = com . amazonaws . services . dynamodbv2 . AcquireLockOptions . builder ( "partitionKey" ) . with... | org . junit . Assert . assertFalse ( left . equals ( right ) ) |
testAppendNotSupported ( ) { org . apache . hadoop . fs . Path localPartitionPath = new org . apache . hadoop . fs . Path ( ( "file://" + ( partitionPath ) ) ) ; org . apache . hadoop . fs . FileSystem localFs = com . uber . hoodie . common . util . FSUtils . getFs ( localPartitionPath . toString ( ) , com . uber . hoo... | org . junit . Assert . assertEquals ( 2 , statuses . length ) |
filtersResourceWhenNotExported ( ) { when ( filter . exportsClass ( org . mule . runtime . module . artifact . api . classloader . FilteringArtifactClassLoaderTestCase . RESOURCE_NAME ) ) . thenReturn ( false ) ; filteringArtifactClassLoader = doCreateClassLoader ( java . util . Collections . emptyList ( ) ) ; java . n... | org . junit . Assert . assertThat ( resource , org . hamcrest . CoreMatchers . equalTo ( null ) ) |
take_should_block_thread_until_element_is_available_in_queue ( ) { io . smartcat . berserker . util . LinkedEvictingBlockingQueue < java . lang . Integer > queue = new io . smartcat . berserker . util . LinkedEvictingBlockingQueue ( ) ; java . util . concurrent . CountDownLatch countDownLatch = new java . util . concur... | org . junit . Assert . assertEquals ( 2 , val ) |
testMonitorWontTryToInstantiateAbstractClass ( ) { final com . picocontainer . containers . TransientPicoContainer tpc = new com . picocontainer . containers . TransientPicoContainer ( ) ; final java . lang . Class < com . picocontainer . web . providers . LateInstantiatingComponentMonitorTestCase . TestAbstract > key ... | org . junit . Assert . assertNull ( testMonitor . noComponentFound ( tpc , key ) ) |
parseEmptySensorWriteResponse ( ) { final java . lang . String [ ] parts = new java . lang . String [ ] { "prov1" , "sensor1" } ; when ( resource . getParts ( ) ) . thenReturn ( parts ) ; final java . util . List < org . sentilo . platform . common . domain . Observation > subscriptionList = java . util . Collections .... | org . junit . Assert . assertEquals ( expected , baos . toString ( ) ) |
testGetPlatformServicesAddServiceType ( ) { org . hyperic . hq . appdef . server . session . ServerType vServerType = createServerType ( "CPU<sp>Server" , "1.0" , new java . lang . String [ ] { testPlatforms . get ( 0 ) . getPlatformType ( ) . getName ( ) } , "Test<sp>virtual<sp>Server<sp>Plugin" , true ) ; org . hyper... | org . junit . Assert . assertEquals ( svalues , svalues1 ) |
checkGetValueMethod ( ) { info . smart_tools . smartactors . iobject . iobject . IObject config = mock ( info . smart_tools . smartactors . iobject . iobject . IObject . class ) ; info . smart_tools . smartactors . iobject . iobject . IObject rule = mock ( info . smart_tools . smartactors . iobject . iobject . IObject ... | org . junit . Assert . assertEquals ( i , "1" ) |
test_subusers_reputations_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 ) ; r... | org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) ) |
findChildInTwoLevelResource ( ) { com . eviware . soapui . impl . rest . RestResource parent = com . eviware . soapui . utils . ModelItemFactory . makeRestResource ( ) ; parent . setPath ( "/parent" ) ; com . eviware . soapui . impl . rest . RestResource child = parent . addNewChildResource ( "child" , "/child" ) ; com... | org . junit . Assert . assertThat ( finder . findResourceAt ( 10 ) , org . hamcrest . core . Is . is ( child ) ) |
readStreamInfo ( ) { final org . toilelibre . libe . soundtransform . model . converted . FormatInfo fi = org . toilelibre . libe . soundtransform . actions . fluent . FluentClient . start ( ) . withAnObserver ( new org . toilelibre . libe . soundtransform . infrastructure . service . observer . Slf4jObserver ( org . t... | org . junit . Assert . assertNotNull ( fi ) |
testGetParametersWithDefaultEntityAndDisabledStatus ( ) { unit . setActive ( false ) ; org . lnu . is . domain . education . type . EducationType entity = new org . lnu . is . domain . education . type . EducationType ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . H... | org . junit . Assert . assertEquals ( expected , actual ) |
testInitDynAnyFromDynAny ( ) { java . lang . String msg ; org . omg . CORBA . Any any = null ; org . omg . CORBA . TypeCode tc = null ; org . omg . DynamicAny . DynEnum dynAny = null ; org . omg . DynamicAny . DynEnum dynAny2 = null ; tc = org . jacorb . test . EnumTypeHelper . type ( ) ; dynAny = createDynAnyFromTypeC... | org . junit . Assert . assertTrue ( msg , dynAny . equal ( dynAny2 ) ) |
testOperationWithWrongNameYamlExtension ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/wrong_name_operation.yaml" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( io . cloudslang . lang . compiler . Slang... | org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) ) |
geocodeStructuredAdressShouldCallGeocodeAddressIfParsedAddressIsSuccess ( ) { GeocodeAdressCalled = false ; com . gisgraphy . geocoding . GeocodingService geocodingService = new com . gisgraphy . geocoding . GeocodingService ( ) { @ com . gisgraphy . geocoding . Override public com . gisgraphy . addressparser . Address... | org . junit . Assert . assertTrue ( GeocodeAdressCalled ) |
shouldIterateReadersUntilFindUsableProperties ( ) { org . jstryker . database . connection . ConnectionPropertiesReader unusableProperties = mock ( org . jstryker . database . connection . ConnectionPropertiesReader . class ) ; org . jstryker . database . connection . ConnectionPropertiesReader usableProperties = new o... | org . junit . Assert . assertSame ( usableProperties , factory . getConnectionPropertiesReader ( ) ) |
testEqual ( ) { final org . apache . drill . exec . expr . holders . VarCharHolder left = org . apache . drill . exec . fn . impl . TestByteComparisonFunctions . hello ; final org . apache . drill . exec . expr . holders . VarCharHolder right = org . apache . drill . exec . fn . impl . TestByteComparisonFunctions . hel... | org . junit . Assert . assertTrue ( ( ( org . apache . drill . exec . expr . fn . impl . ByteFunctionHelpers . equal ( left . buffer , left . start , left . end , right . buffer , right . start , right . end ) ) == 1 ) ) |
testRegressionJavaUtilPropertiesLoadConvert ( ) { java . lang . reflect . Method m = org . adoptopenjdk . jitwatch . test . UnitTestUtil . getMethod ( "java.util.Properties" , "loadConvert" , new java . lang . Class < ? > [ ] { char [ ] . class , int . class , int . class , char [ ] . class } ) ; org . adoptopenjdk . j... | org . junit . Assert . assertTrue ( match ) |
setValueServerWhenReadOnly ( ) { com . vaadin . ui . RichTextArea tf = new com . vaadin . ui . RichTextArea ( ) ; tf . setReadOnly ( true ) ; tf . setValue ( "foo" ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( "foo" , tf . getValue ( ) ) |
testCreateSSLSocketFactory ( ) { org . apache . servicecomb . foundation . ssl . SSLOption option = org . apache . servicecomb . foundation . ssl . SSLOption . build ( ( ( DIR ) + "/server.ssl.properties" ) ) ; org . apache . servicecomb . foundation . ssl . SSLCustom custom = new org . apache . servicecomb . foundatio... | org . junit . Assert . assertNotNull ( aSSLSocketFactory . getDefaultCipherSuites ( ) [ 0 ] ) |
ListAutomationRules ( ) { try { com . smartsheet . api . Smartsheet ss = com . smartsheet . api . sdk_test . HelperFunctions . SetupClient ( "List<sp>Automation<sp>Rules" ) ; com . smartsheet . api . sdk_test . PagedResult < com . smartsheet . api . sdk_test . AutomationRule > automationRules = ss . sheetResources ( ) ... | org . junit . Assert . assertEquals ( 2 , ( ( long ) ( automationRules . getTotalCount ( ) ) ) ) |
shouldReturnAnInstanceOfDefaultProcessorForPath ( ) { org . codegist . crest . param . ParamProcessor actual = org . codegist . crest . param . ParamProcessors . newInstance ( ParamType . PATH , null ) ; "<AssertPlaceHolder>" ; } newInstance ( org . codegist . crest . config . ParamType , java . lang . String ) { switc... | org . junit . Assert . assertSame ( DefaultParamProcessor . INSTANCE , actual ) |
whenIsPowOfInteger_shouldReturnTrueIfPowerOfTwo ( ) { boolean result = com . google . common . math . IntMath . isPowerOfTwo ( 16 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( result ) |
columnsTableNameElementNotInQuotes ( ) { class TestClass { @ com . zaxxer . sansorm . internal . Column ( table = "Table_Name" ) java . lang . String columnName ; } com . zaxxer . sansorm . internal . Introspected introspected = new com . zaxxer . sansorm . internal . Introspected ( TestClass . class ) ; java . lang . ... | org . junit . Assert . assertEquals ( "Table_Name" , columnTableNames [ 0 ] ) |
testGetMissingRomsFilesWithFullRomPath ( ) { org . tibennetwork . iarcade . mame . FakeMameRuntime mame = new org . tibennetwork . iarcade . mame . FakeMameRuntime ( ) ; java . util . List < java . io . InputStream > inputStreams = new java . util . ArrayList ( ) ; inputStreams . add ( new java . io . FileInputStream (... | org . junit . Assert . assertThat ( missingFiles , org . hamcrest . CoreMatchers . equalTo ( expectedMissingFiles ) ) |
puttingShortToEmptyBufferCausesError ( ) { short [ ] array = new short [ 4 ] ; java . nio . ShortBuffer buffer = java . nio . ShortBuffer . wrap ( array ) ; buffer . limit ( 2 ) ; buffer . put ( ( ( short ) ( 2 ) ) ) . put ( ( ( short ) ( 3 ) ) ) ; try { buffer . put ( ( ( short ) ( 5 ) ) ) ; org . junit . Assert . fai... | org . junit . Assert . assertThat ( array [ 2 ] , org . hamcrest . CoreMatchers . is ( ( ( short ) ( 0 ) ) ) ) |
testConvertWithEmptyFields ( ) { org . lnu . is . domain . publicactivity . PublicActivity expected = new org . lnu . is . domain . publicactivity . PublicActivity ( ) ; org . lnu . is . resource . publicactivity . PublicActivityResource source = new org . lnu . is . resource . publicactivity . PublicActivityResource (... | org . junit . Assert . assertEquals ( expected , actual ) |
testSerialThreadBoundClose ( ) { agds . setSleep ( 100 ) ; agds . threadBound = true ; core . setUserRequestSourceConcurrency ( 1 ) ; java . lang . String sql = "SELECT<sp>IntKey<sp>FROM<sp>BQT1.SmallA" ; java . lang . String userName = "logon" ; ( ( org . teiid . common . buffer . impl . BufferManagerImpl ) ( core . g... | org . junit . Assert . assertEquals ( 1 , agds . getCloseCount ( ) . get ( ) ) |
getDefaultLanguage ( ) { when ( operatorServiceLocal . getDefaultLanguage ( ) ) . thenReturn ( DEFAULT_LANGUAGE_ISOCODE ) ; java . lang . String isoCode = service . getDefaultLanguage ( ) ; "<AssertPlaceHolder>" ; } getDefaultLanguage ( ) { javax . persistence . Query q = dm . createNamedQuery ( "SupportedLanguage.find... | org . junit . Assert . assertEquals ( DEFAULT_LANGUAGE_ISOCODE , isoCode ) |
testGetMinMaxY ( ) { System . out . println ( "getMinMaxY" ) ; int maxPoints = 0 ; kg . apc . charting . AbstractGraphRow instance = new kg . apc . charting . AbstractGraphRowTest . AbstractGraphRowImpl ( ) ; double [ ] result = instance . getMinMaxY ( maxPoints ) ; "<AssertPlaceHolder>" ; } getMinMaxY ( int ) { return... | org . junit . Assert . assertNotNull ( result ) |
testDefaultPolicies ( ) { org . springframework . retry . RetryContext context = policy . open ( null ) ; "<AssertPlaceHolder>" ; } open ( org . springframework . retry . RetryContext ) { java . util . List < org . springframework . retry . RetryContext > list = new java . util . ArrayList < org . springframework . ret... | org . junit . Assert . assertNotNull ( context ) |
discardLogicWhitespace3 ( ) { java . lang . String html = rocker . DiscardLogicWhitespace3 . template ( "World" ) . render ( ) . toString ( ) ; java . lang . String expected = "<sp>Hello<sp>World!" ; "<AssertPlaceHolder>" ; } toString ( ) { byte [ ] bytes = toByteArray ( ) ; return new java . lang . String ( bytes , th... | org . junit . Assert . assertEquals ( expected , html ) |
shouldInitialize ( ) { org . apache . sling . api . resource . Resource resource = com . adobe . acs . commons . wcm . comparisons . impl . PageCompareDataImplTest . mockResource ( "/my/path" , "latest" , new java . util . Date ( ) ) ; com . adobe . acs . commons . wcm . comparisons . PageCompareDataLoader one2OneData ... | org . junit . Assert . assertNotNull ( data ) |
getRawShouldReturnNullOnNonexistentPath ( ) { org . apache . hadoop . fs . Path path = new org . apache . hadoop . fs . Path ( "/some/path" ) ; org . apache . metron . rest . service . impl . PcapServiceImpl pcapService = spy ( new org . apache . metron . rest . service . impl . PcapServiceImpl ( environment , configur... | org . junit . Assert . assertNull ( pcapService . getRawPcap ( "user" , "jobId" , 1 ) ) |
testJAXBBeanRepresentationJSONMediaType ( ) { initiateWebApplication ( com . sun . jersey . impl . entity . EntityTypesTest . JAXBBeanResourceJSONMediaType . class ) ; com . sun . jersey . api . client . WebResource r = resource ( "/" ) ; com . sun . jersey . impl . entity . JAXBBean in = new com . sun . jersey . impl ... | org . junit . Assert . assertEquals ( in . value , out . value ) |
func_reactive_unfoldr_iteration_perf ( ) { final java . lang . String rulebase = "rules/reloaded/func_019_perf.prova" ; final long maxCount = 10000 ; final long expectedPatterns = 2537 ; test . ws . prova . test2 . ProvaFunctionalProgrammingTest . ResultCounter count = new test . ws . prova . test2 . ProvaFunctionalPro... | org . junit . Assert . assertEquals ( expectedPatterns , count . get ( ) ) |
test002_toString ( ) { final java . lang . String x = "ff00eedd003713bb1bb26b808ec9312548e73946" ; final org . eclipse . jgit . lib . ObjectId oid = org . eclipse . jgit . lib . ObjectId . fromString ( x ) ; "<AssertPlaceHolder>" ; } name ( ) { final char [ ] b = new char [ Constants . OBJECT_ID_STRING_LENGTH ] ; org .... | org . junit . Assert . assertEquals ( x , oid . name ( ) ) |
equals_differentValues_shouldBeFalse ( ) { com . vaadin . v7 . data . util . filter . Like like1 = new com . vaadin . v7 . data . util . filter . Like ( "test" , "foo" ) ; com . vaadin . v7 . data . util . filter . Like like2 = new com . vaadin . v7 . data . util . filter . Like ( "test" , "bar" ) ; "<AssertPlaceHolder... | org . junit . Assert . assertFalse ( like1 . equals ( like2 ) ) |
testSuccessfulDoubleMatch ( ) { org . graylog2 . plugin . streams . StreamRule rule = getSampleRule ( ) ; rule . setValue ( "100" ) ; org . graylog2 . plugin . Message msg = getSampleMessage ( ) ; msg . addField ( "something" , "20.45" ) ; org . graylog2 . streams . matchers . StreamRuleMatcher matcher = getMatcher ( r... | org . junit . Assert . assertTrue ( matcher . match ( msg , rule ) ) |
testValideEnGeauthenticeerdBericht ( ) { nl . bzk . brp . business . stappen . BerichtVerwerkingsResultaat resultaat = getWebService ( ) . voerBerichtUit ( getBericht ( ) ) ; org . mockito . Mockito . verify ( getBerichtVerwerker ( ) ) . verwerkBericht ( org . mockito . Matchers . any ( nl . bzk . brp . model . bericht... | org . junit . Assert . assertEquals ( 0 , resultaat . getMeldingen ( ) . size ( ) ) |
getVisits_shouldNotFindAnyVisitsIfNoneHaveGivenAttributeValues ( ) { executeDataSet ( org . openmrs . api . VisitServiceTest . VISITS_ATTRIBUTES_XML ) ; java . util . Map < org . openmrs . VisitAttributeType , java . lang . Object > attrs = new java . util . HashMap ( ) ; attrs . put ( visitService . getVisitAttributeT... | org . junit . Assert . assertEquals ( 0 , visits . size ( ) ) |
testMultipleArgsConstructor ( ) { io . beanmother . core . common . FixtureMap fixtureMap = store . reproduce ( "multiple-args-constructor" ) ; java . lang . Object obj = io . beanmother . core . mapper . ConstructHelper . construct ( io . beanmother . core . mapper . ConstructHelperTest . MultipleArgConstructorClass .... | org . junit . Assert . assertTrue ( ( obj instanceof io . beanmother . core . mapper . ConstructHelperTest . MultipleArgConstructorClass ) ) |
string ( ) { final java . util . Collection < com . yandex . yoctodb . util . UnsignedByteArray > elements = new java . util . LinkedList ( ) ; final int size = 10 ; for ( int i = 0 ; i < size ; i ++ ) elements . add ( com . yandex . yoctodb . util . UnsignedByteArrays . from ( i ) ) ; final com . yandex . yoctodb . ut... | org . junit . Assert . assertTrue ( text . contains ( java . lang . Integer . toString ( size ) ) ) |
testBadFormat ( ) { try { org . arquillian . droidium . container . configuration . Validate . sdSize ( sdSizeBadFormat , "Size<sp>of<sp>SD<sp>card<sp>is<sp>not<sp>in<sp>the<sp>propper<sp>format.<sp>Consult<sp>mksdcard<sp>command<sp>for<sp>the<sp>help!" ) ; org . junit . Assert . fail ( ) ; } catch ( org . arquillian .... | org . junit . Assert . assertEquals ( expected , ex . getMessage ( ) ) |
marshall_MPOwnerRevenueShareResult ( ) { org . oscm . billingservice . business . model . mpownershare . MarketplaceOwnerRevenueShareResult mpOwnerRevenueShareResult = createMPOwnerRevenueShareResult ( ) ; byte [ ] serialized = sharesCalculator . marshallRevenueShareResults ( mpOwnerRevenueShareResult ) ; "<AssertPlace... | org . junit . Assert . assertNotNull ( serialized ) |
test_calculatEndTime_datapoint_null ( ) { long now = java . lang . System . currentTimeMillis ( ) ; org . kairosdb . rollup . Duration executionInterval = new org . kairosdb . rollup . Duration ( ) ; long time = org . kairosdb . rollup . RollUpJob . calculateEndTime ( null , executionInterval , now ) ; "<AssertPlaceHol... | org . junit . Assert . assertThat ( time , org . hamcrest . CoreMatchers . equalTo ( now ) ) |
testGetVserverId ( ) { parameters . put ( PropertyHandler . VSERVER_ID , new org . oscm . app . v2_0 . data . Setting ( PropertyHandler . VSERVER_ID , "vserverid" ) ) ; propertyHandler = new org . oscm . app . iaas . PropertyHandler ( settings ) ; java . lang . String id = propertyHandler . getVserverId ( ) ; "<AssertP... | org . junit . Assert . assertEquals ( "vserverid" , id ) |
testGetSetDisposition ( ) { for ( final java . lang . String validChar : testCharsValid ) { attachment . setDisposition ( validChar ) ; "<AssertPlaceHolder>" ; } } getDisposition ( ) { return disposition ; } | org . junit . Assert . assertEquals ( validChar , attachment . getDisposition ( ) ) |
getNoParametersWhenAddingNoParameters ( ) { final org . bonitasoft . engine . bpm . process . impl . ProcessDefinitionBuilder processBuilder = new org . bonitasoft . engine . bpm . process . impl . ProcessDefinitionBuilder ( ) . createNewInstance ( "firstProcess" , "1.0" ) ; processBuilder . addUserTask ( "userTask1" ,... | org . junit . Assert . assertEquals ( 0 , numberOfParamters ) |
testCreateWithDbIndex ( ) { this . pool = new org . springframework . data . redis . connection . lettuce . DefaultLettucePool ( org . springframework . data . redis . SettingsUtils . getHost ( ) , org . springframework . data . redis . SettingsUtils . getPort ( ) ) ; pool . setDatabase ( 1 ) ; pool . afterPropertiesSe... | org . junit . Assert . assertNotNull ( pool . getResource ( ) ) |
testConvertMillisecond ( ) { java . lang . String source = "1525887295000" ; com . box . l10n . mojito . rest . textunit . StringToDateTimeConverter instance = new com . box . l10n . mojito . rest . textunit . StringToDateTimeConverter ( ) ; org . joda . time . DateTime expResult = new org . joda . time . DateTime ( "2... | org . junit . Assert . assertEquals ( expResult , result ) |
testParticipantRemoveFails ( ) { com . hp . mwtests . ts . jta . tools . ObjStoreBrowserTest . HeuristicTestData hd = getHeuristic ( ) ; tryRemove ( true , false , hd ) ; "<AssertPlaceHolder>" ; } getHeuristicParticipants ( ) { java . util . Set < javax . management . ObjectName > names = com . arjuna . ats . arjuna . ... | org . junit . Assert . assertEquals ( 1 , hd . getHeuristicParticipants ( ) . size ( ) ) |
testFindingThreeLinks ( ) { com . gistlabs . mechanize . document . json . node . JsonNode three = json . find ( "three" ) ; java . util . List < com . gistlabs . mechanize . document . json . hypermedia . JsonLink > links = finder . findOn ( three ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . response . getEn... | org . junit . Assert . assertEquals ( 3 , links . size ( ) ) |
containsTest ( ) { geom = org . geotoolkit . lucene . LuceneEnvelopeOnlyTest . GF . createLineString ( new org . locationtech . jts . geom . Coordinate [ ] { new org . locationtech . jts . geom . Coordinate ( 20 , 0 ) , new org . locationtech . jts . geom . Coordinate ( 15 , 0 ) } ) ; org . geotoolkit . geometry . jts ... | org . junit . Assert . assertEquals ( nbResults , 0 ) |
magVerwerktWordenMetPositiefResultaatDoorOverslaanAdmHnd ( ) { final java . util . List < nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortAdministratieveHandeling > overslaanSoortAdministratieveHandelingen = new java . util . ArrayList ( ) ; overslaanSoortAdministratieveHandelingen . add ( SoortAdministra... | org . junit . Assert . assertTrue ( magHet ) |
sameTreadTest ( ) { long value = com . taobao . tddl . qatest . sequence . DefaultSequenceTest . seque . nextValue ( ) ; com . taobao . tddl . sequence . impl . DefaultSequence seque1 = ( ( com . taobao . tddl . sequence . impl . DefaultSequence ) ( com . taobao . tddl . qatest . sequence . DefaultSequenceTest . contex... | org . junit . Assert . assertEquals ( ( value + 1 ) , value1 ) |
shouldSerializeGenericClass ( ) { java . lang . String expectedResult = "<genericWrapper><entityList<sp>class=\"list\"><client><name>washington<sp>botelho</name></client><client><name>washington<sp>botelho</name></client></entityList><total>2</total></genericWrapper>" ; java . util . Collection < br . com . caelum . vr... | org . junit . Assert . assertThat ( result ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( expectedResult ) ) ) |
wildcardMirrorNoBounds ( ) { javax . lang . model . type . WildcardType wildcard = getTypes ( ) . getWildcardType ( null , null ) ; com . squareup . javapoet . TypeName type = com . squareup . javapoet . TypeName . get ( wildcard ) ; "<AssertPlaceHolder>" . isEqualTo ( "?" ) ; } toString ( ) { java . lang . StringBuild... | org . junit . Assert . assertThat ( type . toString ( ) ) |
testDataAccessFinderFindsIt ( ) { java . util . Iterator < org . geotools . data . DataAccessFactory > allFactories = org . geotools . data . DataAccessFinder . getAllDataStores ( ) ; org . geotools . arcsde . data . ArcSDEJNDIDataStoreFactory sdeFac = null ; while ( allFactories . hasNext ( ) ) { org . geotools . data... | org . junit . Assert . assertNotNull ( sdeFac ) |
cnpjInvalido2 ( ) { java . lang . String cpfInvalido = "60562266" ; boolean resultado = br . com . any . utils . ValidadorUtils . isCNPJ ( cpfInvalido ) ; "<AssertPlaceHolder>" ; } isCNPJ ( java . lang . String ) { if ( ( ( ( ( ( ( ( ( ( ( CNPJ . equals ( "00000000000000" ) ) || ( CNPJ . equals ( "11111111111111" ) ) )... | org . junit . Assert . assertFalse ( resultado ) |
testGetErrorMessage_1 ( ) { org . jumbune . utils . exception . JumbuneException fixture = new org . jumbune . utils . exception . JumbuneException ( org . jumbune . utils . exception . ErrorCodesAndMessages . COULD_NOT_CREATE_DIRECTORY ) ; fixture . setErrorCode ( 1 ) ; fixture . setErrorMessage ( "" ) ; java . lang .... | org . junit . Assert . assertEquals ( "" , result ) |
testNullNotEqual ( ) { final org . apache . hc . core5 . http . NameValuePair NameValuePair = new org . apache . hc . core5 . http . message . BasicNameValuePair ( "name" , "value" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj instanceof org . apache .... | org . junit . Assert . assertFalse ( NameValuePair . equals ( null ) ) |
shouldFindSingleElement ( ) { java . util . List < org . w3c . dom . Node > nodes = validateXPath ( "(//InternalListView)[1]" , document ) ; "<AssertPlaceHolder>" ; } validateXPath ( java . lang . String , org . w3c . dom . Document ) { java . util . List < org . w3c . dom . Node > elements = new java . util . ArrayLis... | org . junit . Assert . assertEquals ( nodes . size ( ) , 1 ) |
shouldEqualsReturnTrueAndDoNotMakeInfinityCycleWith3Entities ( ) { final com . qcadoo . model . api . Entity secondEntity = new com . qcadoo . model . internal . DefaultEntity ( dataDefinition ) ; final com . qcadoo . model . api . Entity firstEntity = new com . qcadoo . model . internal . DefaultEntity ( dataDefinitio... | org . junit . Assert . assertEquals ( firstWrappedEntity , firstOtherWrappedEntity ) |
shouldReplaceManifestPlaceholders ( ) { java . lang . String placeholderText = "<manifest>\n" + ( ( ( "<sp><permission\n" + "<sp>android:name=\"${applicationId}.permission.C2D_MESSAGE\"\n" ) + "<sp>android:protectionLevel=\"${custom$}\"<sp>/>\n" ) + "</manifest>" ) ; com . google . common . collect . ImmutableMap < jav... | org . junit . Assert . assertEquals ( expected , replaced ) |
runTest ( ) { boolean result = checkNoError ( "Social_Forums_Forums_Tags" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
testFullDateTimeParsing ( ) { long currentMillis = java . lang . System . currentTimeMillis ( ) ; java . util . Date date = new java . util . Date ( ( currentMillis - ( currentMillis % 1000 ) ) ) ; java . text . DateFormat format = java . text . DateFormat . getDateTimeInstance ( DateFormat . FULL , DateFormat . FULL ,... | org . junit . Assert . assertEquals ( m_testLocale . toString ( ) , date , newDate ) |
testExtraLongRpc ( ) { org . apache . hadoop . ipc . TestProtoBufRpc . TestRpcService2 client = getClient2 ( ) ; final java . lang . String shortString = org . apache . commons . lang3 . StringUtils . repeat ( "X" , 4 ) ; org . apache . hadoop . ipc . protobuf . TestProtos . EchoResponseProto echoResponse = client . ec... | org . junit . Assert . assertEquals ( shortString , echoResponse . getMessage ( ) ) |
testNameTypeStatusList ( ) { for ( org . gbif . api . vocabulary . TypeStatus ts : org . gbif . api . vocabulary . TypeStatus . nameTypeStatusList ( ) ) { if ( ts != ( TypeStatus . TYPE ) ) { "<AssertPlaceHolder>" ; } } } isTypeSpecimen ( ) { return ( ( this ) != ( org . gbif . api . vocabulary . TypeStatus . TYPE_GENU... | org . junit . Assert . assertFalse ( ts . isTypeSpecimen ( ) ) |
testRemoveColumn ( ) { int rows = 10 ; int cols = 5 ; java . util . List < edu . cmu . tetrad . graph . Node > variables = new java . util . LinkedList ( ) ; for ( int i = 0 ; i < cols ; i ++ ) { variables . add ( new edu . cmu . tetrad . data . ContinuousVariable ( ( "X" + i ) ) ) ; } edu . cmu . tetrad . data . DataS... | org . junit . Assert . assertEquals ( dataSet . getVariables ( ) , _variables ) |
testSimple ( ) { com . github . dozermapper . core . functional_tests . MapMappingTest . Simpler input = new com . github . dozermapper . core . functional_tests . MapMappingTest . Simpler ( ) ; input . getValues ( ) . put ( "f" , java . lang . Integer . valueOf ( 5 ) ) ; com . github . dozermapper . core . functional_... | org . junit . Assert . assertEquals ( input . getValues ( ) , output . getValues ( ) ) |
testExtractHourTime ( ) { java . lang . String sqlText = ( "select<sp>t,<sp>EXTRACT(HOUR<sp>FROM<sp>t)<sp>as<sp>\"HOUR\"<sp>from<sp>" + ( com . splicemachine . derby . utils . SpliceDateFunctionsIT . tableWatcherI ) ) + "<sp>order<sp>by<sp>t" ; try ( com . splicemachine . derby . utils . ResultSet rs = methodWatcher . ... | org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) ) |
selectNewPartTest ( ) { final org . uberfire . workbench . model . PartDefinition part = getPartDefinition ( true , false ) ; final boolean selected = listBar . selectPart ( part ) ; "<AssertPlaceHolder>" ; verify ( listBar . titleDropDown , never ( ) ) . selectPart ( part ) ; verify ( listBar , never ( ) ) . setupCont... | org . junit . Assert . assertFalse ( selected ) |
getAmenityObjectWithNull ( ) { com . gisgraphy . domain . geoloc . entity . GisFeature o = osmAmenityToPlacetype . getAmenityObject ( null ) ; "<AssertPlaceHolder>" ; } getAmenityObject ( java . lang . String ) { if ( isNonRealTag ( amenity ) ) { return null ; } com . gisgraphy . domain . geoloc . entity . GisFeature g... | org . junit . Assert . assertEquals ( null , o ) |
testConvertReplyToManyDocs ( ) { final com . allanbank . mongodb . bson . builder . DocumentBuilder db = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . addInteger ( "ok" , 1 ) ; db . pushArray ( "results" ) . push ( ) ; final java . util . List < com . allanbank . mongodb . bson . Document > ... | org . junit . Assert . assertTrue ( callback . convert ( reply ) . toList ( ) . isEmpty ( ) ) |
shouldReturnFalseWhenNewFPMethodOfECIsNotCondom ( ) { boolean didRuleSucceed = newFPMethodIsCondomRule . apply ( new org . ei . drishti . util . SafeMap ( ) . put ( "newMethod" , "ocp" ) ) ; "<AssertPlaceHolder>" ; } put ( java . lang . String , java . lang . String ) { data . put ( key , value ) ; return this ; } | org . junit . Assert . assertFalse ( didRuleSucceed ) |
test_GetToolbarButton_By_Name_with_RegExPattern_Gets_Button ( ) { when ( element . findAll ( mmarquee . automation . BaseAutomationTest . isTreeScope ( TreeScope . Descendants ) , any ( ) ) ) . thenReturn ( list ) ; when ( targetElement . getName ( ) ) . thenReturn ( "myName" ) ; mmarquee . automation . controls . Auto... | org . junit . Assert . assertEquals ( targetElement , button . getElement ( ) ) |
testNoServiceNOPortType ( ) { env . put ( ToolConstants . CFG_ALL , ToolConstants . CFG_ALL ) ; env . put ( ToolConstants . CFG_WSDLURL , getLocation ( "/wsdl2java_wsdl/no_port_or_service.wsdl" ) ) ; processor . setContext ( env ) ; processor . execute ( ) ; java . lang . Class < ? > clz = classLoader . loadClass ( "or... | org . junit . Assert . assertNotNull ( clz ) |
nullConditionShouldNotMatch ( ) { final java . lang . String existingSystemProperty = "existing.system.property" ; com . navercorp . pinpoint . common . util . SystemProperty property = com . navercorp . pinpoint . bootstrap . resolver . condition . SystemPropertyConditionTest . createTestProperty ( existingSystemPrope... | org . junit . Assert . assertFalse ( matches ) |
batchIterable_forEachEntry ( ) { com . gs . collections . impl . parallel . BatchIterable < Map . Entry < java . lang . Integer , java . lang . Integer > > entries = ( ( com . gs . collections . impl . parallel . BatchIterable < Map . Entry < java . lang . Integer , java . lang . Integer > > ) ( com . gs . collections ... | org . junit . Assert . assertEquals ( 20 , sum . getValue ( ) ) |
testCompileArcWithTolerance ( ) { com . vividsolutions . jts . io . WKTReader reader = new com . vividsolutions . jts . io . WKTReader ( ) ; try { com . vividsolutions . jts . geom . Geometry g1 = reader . read ( "LINESTRING<sp>(601103.3340069023<sp>129288.05055561525,<sp>601102.0842804064<sp>129856.67611130093,<sp>601... | org . junit . Assert . assertNotNull ( result ) |
testDecodeGeneralizedTimeWithTimeZoneZ ( ) { java . util . Calendar cal = java . util . Calendar . getInstance ( ) ; cal . clear ( ) ; cal . set ( Calendar . YEAR , 2010 ) ; cal . set ( Calendar . MONTH , Calendar . JULY ) ; cal . set ( Calendar . DAY_OF_MONTH , 12 ) ; cal . set ( Calendar . HOUR_OF_DAY , 21 ) ; cal . ... | org . junit . Assert . assertEquals ( expectedDate , actualDate ) |
testEnableDropletBackups ( ) { com . myjeeva . digitalocean . pojo . Action action = apiClient . enableDropletBackups ( 9662284 ) ; "<AssertPlaceHolder>" ; log . info ( action . toString ( ) ) ; } enableDropletBackups ( java . lang . Integer ) { validateDropletId ( dropletId ) ; java . lang . Object [ ] params = new ja... | org . junit . Assert . assertNotNull ( action ) |
testBothInstanceAndLocalVariableMessageCorrelation ( ) { org . camunda . bpm . model . bpmn . BpmnModelInstance model = org . camunda . bpm . model . bpmn . Bpmn . createExecutableProcess ( "Process_1" ) . startEvent ( ) . subProcess ( "SubProcess_1" ) . embeddedSubProcess ( ) . startEvent ( ) . receiveTask ( "SubProce... | org . junit . Assert . assertEquals ( 5 , uncorrelatedExecutions . size ( ) ) |
testValidate ( ) { java . util . Map < java . lang . String , org . apache . kafka . common . config . ConfigValue > expected = new java . util . HashMap ( ) ; java . lang . String errorMessageB = "Missing<sp>required<sp>configuration<sp>\"b\"<sp>which<sp>has<sp>no<sp>default<sp>value." ; java . lang . String errorMess... | org . junit . Assert . assertEquals ( expectedConfig , config ) |
checkReservedNames ( ) { System . out . println ( ( ( cz . metacentrum . perun . core . entry . ModulesUtilsEntryIntegrationTest . CLASS_NAME ) + "checkReservedNames" ) ) ; java . lang . String goodName = "cokoliv" ; java . lang . String badName = "sys" ; cz . metacentrum . perun . core . api . Attribute attr = new cz ... | org . junit . Assert . assertTrue ( ok ) |
testPut ( ) { com . googlecode . concurrenttrees . radixinverted . ConcurrentInvertedRadixTree < java . lang . Integer > tree = new com . googlecode . concurrenttrees . radixinverted . ConcurrentInvertedRadixTree < java . lang . Integer > ( getNodeFactory ( ) ) ; tree . put ( "FOO" , 1 ) ; tree . put ( "FOOBAR" , 2 ) ;... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetParametersWithDefaultEntityAndDisabledDefaults ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . timesheet . type . TimeSheetType entity = new org . lnu . is . domain . timesheet . type . TimeSheetType ( ) ; java . util . Map < java . lang . String , java . lang . Object... | org . junit . Assert . assertEquals ( expected , actual ) |
testClassInitializationFailure ( ) { java . lang . Throwable throwable = new java . lang . Throwable ( ) ; com . liferay . portal . test . aspects . ReflectionUtilAdvice . setDeclaredMethodThrowable ( throwable ) ; try { java . lang . Class . forName ( com . liferay . portal . bean . ConstantsBeanFactoryImpl . class . ... | org . junit . Assert . assertSame ( throwable , eiie . getCause ( ) ) |
getNextTupleTest6 ( ) { java . util . List < edu . uci . ics . texera . api . tuple . Tuple > data = edu . uci . ics . texera . dataflow . nlp . entity . NlpEntityTestConstants . getTest4Tuple ( ) ; edu . uci . ics . texera . storage . DataWriter twoSentenceDataWriter = edu . uci . ics . texera . storage . RelationMana... | org . junit . Assert . assertTrue ( contains ) |
lookupNodes ( ) { java . lang . String createNodeQuery = "CREATE<sp>(p1:Person<sp>{name:<sp>'Mark'})<sp>CREATE<sp>(p2:Person<sp>{name:<sp>'Arya'})<sp>RETURN<sp>p1,<sp>p2" ; org . neo4j . graphalgo . algo . Map < java . lang . String , java . lang . Object > savedRow = org . neo4j . graphalgo . algo . GetNodeFuncTest . ... | org . junit . Assert . assertEquals ( org . neo4j . graphalgo . algo . Arrays . asList ( savedNode1 , savedNode2 ) , nodes ) |
test_isLeapYear_inLastWeekOf ( java . time . DayOfWeek , java . time . Month ) { org . threeten . extra . chrono . AccountingChronology chronology = new org . threeten . extra . chrono . AccountingChronologyBuilder ( ) . endsOn ( dayOfWeek ) . inLastWeekOf ( ending ) . withDivision ( AccountingYearDivision . QUARTERS_O... | org . junit . Assert . assertEquals ( isLeapYear . test ( year ) , chronology . isLeapYear ( year ) ) |
testMailFrom ( ) { java . lang . System . setProperty ( "user.name" , "Joe" ) ; java . util . Properties p = new java . util . Properties ( ) ; p . setProperty ( "mail.from" , "Bob@home" ) ; javax . mail . Session s = javax . mail . Session . getInstance ( p ) ; javax . mail . internet . InternetAddress ia = javax . ma... | org . junit . Assert . assertEquals ( "Bob@home" , ia . getAddress ( ) ) |
testGetDownloadFileInAStringFileIsDownloaded ( ) { org . phoenicis . tools . http . DownloaderTest . mockServer . when ( request ( ) . withMethod ( "GET" ) . withPath ( "/test2.txt" ) ) . respond ( response ( ) . withStatusCode ( 200 ) . withHeaders ( new org . mockserver . model . Header ( "Content-Type" , "applicatio... | org . junit . Assert . assertEquals ( "Content<sp>file<sp>to<sp>download<sp>2" , result ) |
concurrentTestReadFasterThanWrite ( ) { final int totalTimes = 10000 ; final int writerCount = 10 ; final int readerCount = 20 ; com . geekhua . filequeue . Config config = new com . geekhua . filequeue . Config ( ) ; config . setBaseDir ( com . geekhua . filequeue . FileQueueImplTest . baseDir . getAbsolutePath ( ) ) ... | org . junit . Assert . assertEquals ( expected , results ) |
shouldSaveData ( ) { jsonDataSaver . saveJSONData ( destDir , "data" , null , uriFileTranslator ) ; java . lang . String json = ioUtils . loadFromFileSystem ( new java . io . File ( destDir , "jscoverage.json" ) ) ; "<AssertPlaceHolder>" ; } saveJSONData ( java . io . File , java . lang . String , jscover . report . Li... | org . junit . Assert . assertThat ( json , org . hamcrest . CoreMatchers . equalTo ( "data" ) ) |
selectorWithoutIndicatorsPatternAndMultipleMatchingValues ( ) { final java . lang . String expectedValue = "This<sp>is<sp>the<sp>expected<sp>value" ; final org . marc4j . marc . Record record = newRecord ( eu . aliada . rdfizer . pipeline . format . marc . selector . binary . A_VARIABLE_FIELD_NAME , '#' , '#' , 'a' , e... | org . junit . Assert . assertEquals ( expectedValue , expression . evaluate ( record ) ) |
cloneAsVersionTest ( ) { final org . opendaylight . controller . cluster . access . commands . ReadTransactionSuccess clone = org . opendaylight . controller . cluster . access . commands . ReadTransactionSuccessTest . OBJECT . cloneAsVersion ( ABIVersion . BORON ) ; "<AssertPlaceHolder>" ; } cloneAsVersion ( org . ope... | org . junit . Assert . assertEquals ( org . opendaylight . controller . cluster . access . commands . ReadTransactionSuccessTest . OBJECT , clone ) |
testComputeCallbackUrlAlreadyDefined ( ) { final java . lang . String callbackUrl = ( ( ( CALLBACK_URL ) + '?' ) + ( org . pac4j . core . context . Pac4jConstants . DEFAULT_CLIENT_NAME_PARAMETER ) ) + "=cn" ; final java . lang . String url = org . pac4j . core . http . callback . QueryParameterCallbackUrlResolverTests ... | org . junit . Assert . assertEquals ( callbackUrl , url ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.