input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testMore ( ) { for ( java . lang . String [ ] pattern : uk . gov . nationalarchives . droid . core . interfaces . util . DroidUrlFormatTest . TEST_PATTERNS ) { java . net . URI uri = new java . net . URI ( pattern [ 0 ] ) ; java . lang . String result = uk . gov . nationalarchives . droid . core . interfaces . util . D... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . equalTo ( pattern [ 1 ] ) ) |
preserves_filters_from_cli_if_filters_not_specified_in_cucumber_options_property ( ) { properties . setProperty ( "cucumber.options" , "--strict" ) ; cucumber . runtime . RuntimeOptions options = new cucumber . runtime . RuntimeOptions ( new cucumber . runtime . Env ( properties ) , asList ( "--tags" , "@keep_this" ) )... | org . junit . Assert . assertThat ( options . getTagFilters ( ) , contains ( "@keep_this" ) ) |
testSkipReplayAndUpdateSeqId ( ) { rootDir = org . apache . hadoop . hbase . snapshot . TestRestoreSnapshotHelper . TEST_UTIL . getDefaultRootDirPath ( ) ; org . apache . hadoop . hbase . util . FSUtils . setRootDir ( conf , rootDir ) ; org . apache . hadoop . hbase . TableName tableName = org . apache . hadoop . hbase... | org . junit . Assert . assertTrue ( ( maxSeqId2 > maxSeqId ) ) |
givenListWithAnElement_whenGet_thenThatElementIsReturned ( ) { java . util . List < java . lang . Object > list = new com . baeldung . java . list . CustomList ( ) ; list . add ( "baeldung" ) ; java . lang . Object element = list . get ( 0 ) ; "<AssertPlaceHolder>" ; } get ( int ) { return ( ( E ) ( internal [ index ] ... | org . junit . Assert . assertEquals ( "baeldung" , element ) |
testSetGetBlueprintEntity ( ) { org . apache . ambari . server . orm . entities . BlueprintEntity bp = new org . apache . ambari . server . orm . entities . BlueprintEntity ( ) ; org . apache . ambari . server . orm . entities . BlueprintSettingEntity entity = new org . apache . ambari . server . orm . entities . Bluep... | org . junit . Assert . assertSame ( bp , entity . getBlueprintEntity ( ) ) |
shouldCreateANewConnection ( ) { "<AssertPlaceHolder>" ; } getConnection ( ) { try { org . jstryker . database . connection . ConnectionPropertiesReader propertiesReader = new org . jstryker . database . connection . ConnectionPropertiesReaderFactory ( org . jstryker . database . ConnectionHelper . PROPERTIES_READERS )... | org . junit . Assert . assertNotNull ( org . jstryker . database . ConnectionHelper . getConnection ( ) ) |
testHerstellenBerichtenNullDatum ( ) { final int aantalHersteldeBerichten = subject . herstellenVoiscBerichten ( null ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 0 , aantalHersteldeBerichten ) |
readObject ( ) { this . request . setContentType ( new org . springframework . http . MediaType ( "application" , "x-amf" ) . toString ( ) ) ; this . request . setContent ( serializeToByteArray ( org . springframework . flex . core . io . domain . Person . stubPerson ( ) ) ) ; org . springframework . http . HttpInputMe... | org . junit . Assert . assertTrue ( ( result instanceof org . springframework . flex . core . io . domain . Person ) ) |
generateOccurrencesInRangeWithNoEvents ( ) { java . util . List < com . stratelia . webactiv . almanach . model . EventDetail > events = new java . util . ArrayList < com . stratelia . webactiv . almanach . model . EventDetail > ( ) ; java . util . List < com . stratelia . webactiv . almanach . model . EventOccurrence ... | org . junit . Assert . assertThat ( occurrences . isEmpty ( ) , is ( true ) ) |
testRedissonInstance ( ) { javax . cache . configuration . Configuration < java . lang . String , java . lang . String > config = org . redisson . jcache . configuration . RedissonConfiguration . fromInstance ( redisson ) ; javax . cache . Cache < java . lang . String , java . lang . String > cache = javax . cache . Ca... | org . junit . Assert . assertEquals ( "2" , cache . get ( "1" ) ) |
testNegPosFirstLonger ( ) { java . lang . String numA = "-2837462783428374767845648748973847593874837948575684767" ; java . lang . String numB = "293478573489347658763745839457637" ; java . lang . String res = "-2837462783428374767845615168483972194300564226167553532" ; java . math . BigInteger aNumber = new java . mat... | org . junit . Assert . assertTrue ( res . equals ( result . toString ( ) ) ) |
shouldFindNamingStrategyProviders ( ) { victim = ro . isdc . wro . util . provider . ProviderFinder . of ( ro . isdc . wro . model . resource . support . naming . NamingStrategyProvider . class ) ; "<AssertPlaceHolder>" ; } find ( ) { final java . util . List < T > providers = new java . util . ArrayList < T > ( ) ; tr... | org . junit . Assert . assertEquals ( 1 , victim . find ( ) . size ( ) ) |
testIsQueryExecutable ( ) { org . pentaho . reporting . engine . classic . core . DataRow parameters = mock ( org . pentaho . reporting . engine . classic . core . DataRow . class ) ; javax . swing . table . TableModel model = mock ( javax . swing . table . TableModel . class ) ; doReturn ( model ) . when ( parameters ... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( true ) ) ) |
test_withSecond_noChange ( ) { java . time . OffsetDateTime base = java . time . OffsetDateTime . of ( java . time . LocalDate . of ( 2008 , 6 , 30 ) , java . time . LocalTime . of ( 11 , 30 , 59 ) , test . java . time . TestOffsetDateTime . OFFSET_PONE ) ; java . time . OffsetDateTime test = base . withSecond ( 59 ) ;... | org . junit . Assert . assertSame ( test , base ) |
testElement ( ) { java . lang . String doc = "<?xml<sp>version=\"1.0\"<sp>encoding=\"utf-8\"<sp>?><a><b><c>test</c></b></a>" ; java . lang . String xpath = "a/b/c" ; java . lang . String value = org . teiid . xquery . saxon . XMLFunctions . xpathValue ( doc , xpath ) ; "<AssertPlaceHolder>" ; } xpathValue ( java . lang... | org . junit . Assert . assertEquals ( "test" , value ) |
testJsonEscaping ( ) { org . apache . beam . sdk . transforms . DoFn < java . lang . Integer , java . lang . Integer > doFn = new org . apache . beam . sdk . transforms . DoFn < java . lang . Integer , java . lang . Integer > ( ) { @ org . apache . beam . sdk . transforms . DoFn . ProcessElement public void processElem... | org . junit . Assert . assertArrayEquals ( serializedBytes , jsonStringToByteArray ( serializedJson ) ) |
read ( ) { when ( readTransaction . read ( LogicalDatastoreType . CONFIGURATION , null ) ) . thenReturn ( com . google . common . util . concurrent . Futures . immediateCheckedFuture ( com . google . common . base . Optional . of ( dataObject ) ) ) ; java . util . concurrent . CompletableFuture completableFuture = read... | org . junit . Assert . assertThat ( completableFuture . get ( ) , org . hamcrest . Matchers . is ( dataObject ) ) |
testSetRouterMac ( ) { config . setRouterMac ( "00:00:00:00:02:80" ) ; "<AssertPlaceHolder>" ; } routerMac ( ) { java . lang . String mac = get ( org . onosproject . segmentrouting . config . SegmentRoutingDeviceConfig . MAC , null ) ; return mac != null ? org . onlab . packet . MacAddress . valueOf ( mac ) : null ; } | org . junit . Assert . assertThat ( config . routerMac ( ) , org . hamcrest . Matchers . is ( org . onlab . packet . MacAddress . valueOf ( "00:00:00:00:02:80" ) ) ) |
challengeResponseSuccess ( ) { com . microsoft . azure . sdk . iot . provisioning . device . internal . contract . amqp . AmqpsProvisioningSymmetricKeySaslHandler handler = mockit . Deencapsulation . newInstance ( com . microsoft . azure . sdk . iot . provisioning . device . internal . contract . amqp . AmqpsProvisioni... | org . junit . Assert . assertEquals ( 0 , challengeResponseBytes . length ) |
shouldGetPipelineVersionFromBuildAction ( ) { hudson . model . FreeStyleProject project = jenkins . createFreeStyleProject ( "firstProject" ) ; hudson . model . FreeStyleBuild build = project . scheduleBuild2 ( 0 , new hudson . cli . BuildCommand . CLICause ( ) , new hudson . model . ParametersAction ( new hudson . mod... | org . junit . Assert . assertEquals ( "1.1" , se . diabol . jenkins . pipeline . PipelineVersionContributor . getVersion ( build ) ) |
emptyMapDoesNotContainKey ( ) { io . joynr . util . MultiMap < java . lang . String , java . lang . String > multiMap = new io . joynr . util . MultiMap ( ) ; final java . lang . String key = "key" ; "<AssertPlaceHolder>" ; } containsKey ( java . lang . String ) { boolean containsKey = hashMap . containsKey ( participa... | org . junit . Assert . assertFalse ( multiMap . containsKey ( key ) ) |
testEmptyInputWithCombiner ( ) { conf . setMapperClass ( WordCount . TokenizerMapper . class ) ; conf . setCombinerClass ( WordCount . SumCombiner . class ) ; conf . setMapOutputKeySchema ( com . aliyun . odps . mapred . utils . SchemaUtils . fromString ( "word:string" ) ) ; conf . setMapOutputValueSchema ( com . aliyu... | org . junit . Assert . assertEquals ( 0 , forwarded . size ( ) ) |
testSendReplacesBodyToken ( ) { registerEntryPoint ( WebClient . BODY_HTML , "<body<sp>/>" ) ; startupPage . activate ( ) ; mockTemplate ( org . eclipse . rap . rwt . internal . service . StartupPage_Test . variableFrom ( StartupPageTemplate . TOKEN_BODY ) ) ; startupPage . send ( response ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertEquals ( "<body<sp>/>" , response . getContent ( ) ) |
test_access_settings_activity_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 ( ) ) |
testUpdateThrow ( ) { com . j256 . ormlite . dao . Dao < com . j256 . ormlite . dao . Foo , java . lang . Integer > dao = createDao ( com . j256 . ormlite . dao . Foo . class , true ) ; com . j256 . ormlite . dao . Foo foo = new com . j256 . ormlite . dao . Foo ( ) ; "<AssertPlaceHolder>" ; com . j256 . ormlite . suppo... | org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) ) |
testNotEquals ( ) { com . google . auth . oauth2 . GoogleCredentials credentials = com . google . auth . oauth2 . GoogleCredentials . fromStream ( ServiceAccount . EDITOR . asStream ( ) ) ; com . google . firebase . FirebaseOptions options1 = new com . google . firebase . FirebaseOptions . Builder ( ) . setCredentials ... | org . junit . Assert . assertFalse ( options1 . equals ( options2 ) ) |
should_create_corect_query_for_complex_operators ( ) { final java . lang . String methodName = "getByItemNameLikeOrAgeGreaterThanAndAgeLessThan" ; final org . springframework . data . repository . query . parser . PartTree tree = new org . springframework . data . repository . query . parser . PartTree ( methodName , o... | org . junit . Assert . assertEquals ( expected , query ) |
testDepthWithMaxChildren3Entries3 ( ) { com . github . davidmoten . rtree . RTree < java . lang . Object , com . github . davidmoten . rtree . geometry . Rectangle > tree = com . github . davidmoten . rtree . RTreeTest . create ( 3 , 3 ) ; "<AssertPlaceHolder>" ; } calculateDepth ( ) { return com . github . davidmoten ... | org . junit . Assert . assertEquals ( 1 , tree . calculateDepth ( ) ) |
shouldSkipAuthentication ( ) { "<AssertPlaceHolder>" ; } isAuthenticated ( ) { if ( org . openmrs . api . context . Daemon . isDaemonThread ( ) ) { return true ; } else { return ( org . openmrs . api . context . Context . getAuthenticatedUser ( ) ) != null ; } } | org . junit . Assert . assertFalse ( org . openmrs . api . context . Context . isAuthenticated ( ) ) |
getEncountersByVisit_shouldGetActiveEncountersByVisit ( ) { java . util . List < org . openmrs . Encounter > encounters = org . openmrs . api . context . Context . getEncounterService ( ) . getEncountersByVisit ( new org . openmrs . Visit ( 1 ) , false ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) ... | org . junit . Assert . assertEquals ( 1 , encounters . size ( ) ) |
testBasicKeyboardInputOnActiveElement ( ) { driver . get ( pages . javascriptPage ) ; org . openqa . selenium . qtwebkit . hybridtests . WebElement keyReporter = driver . findElement ( org . openqa . selenium . qtwebkit . hybridtests . By . id ( "keyReporter" ) ) ; keyReporter . click ( ) ; org . openqa . selenium . in... | org . junit . Assert . assertThat ( keyReporter . getAttribute ( "value" ) , org . hamcrest . Matchers . is ( "abc<sp>def" ) ) |
testCreateWithHostPortAndDbIndex ( ) { this . pool = new org . springframework . data . redis . connection . jredis . JredisPool ( org . springframework . data . redis . SettingsUtils . getHost ( ) , org . springframework . data . redis . SettingsUtils . getPort ( ) , 1 , null , 0 ) ; "<AssertPlaceHolder>" ; } getResou... | org . junit . Assert . assertNotNull ( pool . getResource ( ) ) |
testMerge ( ) { org . apache . druid . query . Result < org . apache . druid . query . timeseries . TimeseriesResultValue > result1 = new org . apache . druid . query . Result < org . apache . druid . query . timeseries . TimeseriesResultValue > ( currTime , new org . apache . druid . query . timeseries . TimeseriesRes... | org . junit . Assert . assertEquals ( expected , actual ) |
testGCD ( ) { org . jbasics . math . BigRational test = new org . jbasics . math . BigRational ( 2L , 4L ) ; java . math . BigInteger gcd = test . gcd ( ) ; "<AssertPlaceHolder>" ; } valueOf ( java . lang . String ) { return org . jbasics . math . expression . simple . SimpleExpression . parse ( expression ) ; } | org . junit . Assert . assertEquals ( java . math . BigInteger . valueOf ( 2L ) , gcd ) |
testGetResourceNameFromIndexCleanOutput ( ) { org . opennms . netmgt . model . ResourcePath parentResource = org . opennms . netmgt . model . ResourcePath . get ( "1" ) ; org . opennms . netmgt . collection . api . CollectionResource resource = new org . opennms . netmgt . dao . support . MockCollectionResource ( paren... | org . junit . Assert . assertEquals ( expResult , result ) |
getNoMoreInformationMessage ( ) { org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveWakeUpCommandClass cls = ( ( org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveWakeUpCommandClass ) ( getCommandClass ( CommandClass . COMMAND_CLASS_WAKE_UP ) ) ) ; org . openhab . bin... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( msg . getPayloadBuffer ( ) , expectedResponseV1 ) ) |
Bodynull ( ) { org . odata4j . core . OProperty < ? > expected = org . odata4j . core . OProperties . string ( SentMessage . P_BODY . getName ( ) , "" ) ; org . odata4j . core . OProperty < ? > result = this . setDefaultValue ( SentMessage . P_BODY . build ( ) , SentMessage . P_BODY . getName ( ) , org . odata4j . core... | org . junit . Assert . assertEquals ( expected . getValue ( ) , result . getValue ( ) ) |
retrievesDefaultValueWhenHeaderDoesNotPresentInRequest ( ) { when ( parameter . getDefaultValue ( ) ) . thenReturn ( "default<sp>value" ) ; when ( typeProducer . createValue ( "foo" , headers , "default<sp>value" ) ) . thenReturn ( "default<sp>value" ) ; java . lang . Object resolvedHeader = headerParameterResolver . r... | org . junit . Assert . assertEquals ( "default<sp>value" , resolvedHeader ) |
test1170825 ( ) { org . jfree . data . time . ohlc . OHLCSeries s1 = new org . jfree . data . time . ohlc . OHLCSeries ( "Series1" ) ; org . jfree . data . time . ohlc . OHLCSeriesCollection dataset = new org . jfree . data . time . ohlc . OHLCSeriesCollection ( ) ; dataset . addSeries ( s1 ) ; try { dataset . getSerie... | org . junit . Assert . assertTrue ( false ) |
testPermuteAssingn ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 60 , 60 ) . reshape ( 'c' , 3 , 4 , 5 ) ; org . nd4j . linalg . api . ndarray . INDArray arr2 = arr . permute ( 1 , 0 , 2 ) ; org . nd4j . linalg . api . ndarray . INDArray arr3 = arr2 . d... | org . junit . Assert . assertEquals ( arr2 , arr3 ) |
testDoRenameNegative ( ) { org . pentaho . platform . api . repository2 . unified . RepositoryFile repositoryFile = mock ( org . pentaho . platform . api . repository2 . unified . RepositoryFile . class ) ; when ( repositoryFile . getPath ( ) ) . thenReturn ( "/dir/file.txt" ) ; when ( repositoryFile . getName ( ) ) . ... | org . junit . Assert . assertFalse ( success ) |
conditionFromListIsValid ( ) { java . util . SortedMap < java . lang . String , java . lang . String > conditionMap = new java . util . TreeMap < java . lang . String , java . lang . String > ( ) ; conditionMap . put ( "Include<sp>Example<sp>Code?" 7 , "com.atlassian.test.NoFacialHairCondition" ) ; conditionMap . put (... | org . junit . Assert . assertEquals ( "Include<sp>Example<sp>Code?" 8 , "com.atlassian.test.NoFacialHairCondition" , condition . getFullyQualifiedClassName ( ) ) |
iremove5 ( ) { org . roaringbitmap . buffer . MappeableContainer rc = new org . roaringbitmap . buffer . MappeableRunContainer ( ) ; rc . iadd ( 0 , 10 ) ; rc . iadd ( 20 , 30 ) ; rc . iremove ( 0 , 31 ) ; "<AssertPlaceHolder>" ; } getCardinality ( ) { return ( ( int ) ( getLongCardinality ( ) ) ) ; } | org . junit . Assert . assertEquals ( 0 , rc . getCardinality ( ) ) |
testOpen_invalid ( ) { java . io . File path = new java . io . File ( "" ) ; org . eclipse . tracecompass . ctf . core . trace . CTFTrace result = new org . eclipse . tracecompass . ctf . core . trace . CTFTrace ( path ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( result ) |
givenQuoteContainingData_whenEscapeSpecialCharacters_stringReturnedFormatted ( ) { java . lang . String data = "She<sp>said<sp>\"Hello\"" ; java . lang . String escapedData = csvExample . escapeSpecialCharacters ( data ) ; java . lang . String expectedData = "\"She<sp>said<sp>\"\"Hello\"\"\"" ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertEquals ( expectedData , escapedData ) |
serializeReplyWithJoynrSendBufferFullException ( ) { io . joynr . exceptions . JoynrSendBufferFullException error = new io . joynr . exceptions . JoynrSendBufferFullException ( new java . util . concurrent . RejectedExecutionException ( "cause<sp>message" ) ) ; joynr . Reply reply = new joynr . Reply ( java . util . UU... | org . junit . Assert . assertEquals ( reply , receivedReply ) |
testSimultaneousPutAndContains ( ) { com . rackspacecloud . blueflood . service . ExecutorService executorService = com . rackspacecloud . blueflood . service . Executors . newCachedThreadPool ( ) ; final com . rackspacecloud . blueflood . service . CountDownLatch startLatch = new com . rackspacecloud . blueflood . ser... | org . junit . Assert . assertTrue ( testSet . contains ( 1 ) ) |
testSimplifyAndTrue ( ) { org . batfish . z3 . expr . BooleanExpr p1 = newAtom ( ) ; org . batfish . z3 . expr . BooleanExpr p2 = newAtom ( ) ; org . batfish . z3 . expr . AndExpr and = new org . batfish . z3 . expr . AndExpr ( of ( TrueExpr . INSTANCE , p1 , TrueExpr . INSTANCE , p2 ) ) ; "<AssertPlaceHolder>" ; } sim... | org . junit . Assert . assertThat ( org . batfish . z3 . expr . visitors . Simplifier . simplifyBooleanExpr ( and ) , org . hamcrest . Matchers . equalTo ( new org . batfish . z3 . expr . AndExpr ( of ( p1 , p2 ) ) ) ) |
testNoAnyIntentToApply ( ) { org . onosproject . net . intent . IntentData toInstall = null ; org . onosproject . net . intent . IntentData toUninstall = null ; org . onosproject . net . intent . IntentOperationContext < org . onosproject . net . domain . DomainIntent > operationContext ; org . onosproject . net . inte... | org . junit . Assert . assertEquals ( successContext , operationContext ) |
whenSearchingWithFields_thenAllMatchingItemsShouldAvialble ( ) { com . baeldung . solr . fulltext . search . service . ItemSearchServiceLiveTest . itemSearchService . index ( "0001" , "Brand1<sp>Washing<sp>Machine" , "Home<sp>Appliances" , 450.0F ) ; com . baeldung . solr . fulltext . search . service . ItemSearchServi... | org . junit . Assert . assertEquals ( 1 , items . size ( ) ) |
testFailedLessThanWithEqualsComparison ( ) { new org . opennms . core . criteria . CriteriaBuilder ( org . opennms . netmgt . dao . mock . BeanWrapperVisitorTest . TestBean . class ) . lt ( "four" , 4 ) . toCriteria ( ) . visit ( m_visitor ) ; "<AssertPlaceHolder>" ; } getMatches ( ) { return ( m_matches ) == null ? "(... | org . junit . Assert . assertEquals ( 0 , m_visitor . getMatches ( ) . size ( ) ) |
shouldGetChecks ( ) { java . lang . String id = java . util . UUID . randomUUID ( ) . toString ( ) ; client . agentClient ( ) . register ( 8080 , 20L , java . util . UUID . randomUUID ( ) . toString ( ) , id , com . orbitz . consul . AgentITest . NO_TAGS , com . orbitz . consul . AgentITest . NO_META ) ; boolean found ... | org . junit . Assert . assertTrue ( found ) |
nextUp3 ( ) { org . diirt . graphene . TimeScales . TimePeriod nextUp = org . diirt . graphene . TimeScales . nextUp ( new org . diirt . graphene . TimeScales . TimePeriod ( SECOND , 5 ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( nextUp , equalTo ( new org . diirt . graphene . TimeScales . TimePeriod ( SECOND , 10 ) ) ) |
shouldReturnFalseIfAgeIsNotLessThan23Months ( ) { org . ei . drishti . util . SafeMap safeMap = new org . ei . drishti . util . SafeMap ( ) ; safeMap . put ( "serviceProvidedDate" , "2014-03-01" ) ; safeMap . put ( "dateOfBirth" , "2011-01-01" ) ; boolean didRuleApply = rule . apply ( safeMap ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertFalse ( didRuleApply ) |
testLifecycleIsIgnoredIfAdaptersAreNotLifecycleManagers ( ) { com . picocontainer . DefaultPicoContainer parent = new com . picocontainer . DefaultPicoContainer ( new com . picocontainer . injectors . ConstructorInjection ( ) ) ; com . picocontainer . MutablePicoContainer child = parent . makeChildContainer ( ) ; paren... | org . junit . Assert . assertEquals ( "" , parent . getComponent ( "recording" ) . toString ( ) ) |
testExistsAcrossZone ( ) { if ( ! ( org . irods . jargon . core . pub . io . FederatedIRODSFileImplTest . testingPropertiesHelper . isTestFederatedZone ( org . irods . jargon . core . pub . io . FederatedIRODSFileImplTest . testingProperties ) ) ) { return ; } java . lang . String testFileName = "testExistsAcrossZone.t... | org . junit . Assert . assertTrue ( target . exists ( ) ) |
testSearchByDraftStatus ( ) { addStructure ( 0 , com . liferay . dynamic . data . mapping . service . test . DDMStructureLocalServiceTest . _classNameId , null , com . liferay . portal . kernel . util . StringUtil . randomString ( ) , StringPool . BLANK , read ( "test-structure.xsd" ) , StorageType . JSON . getValue ( ... | org . junit . Assert . assertEquals ( structures . toString ( ) , 1 , structures . size ( ) ) |
setStatusIdSets ( ) { final byte [ ] actualData = new byte [ ] { } ; com . microsoft . azure . sdk . iot . device . transport . IotHubTransportMessage msg = new com . microsoft . azure . sdk . iot . device . transport . IotHubTransportMessage ( actualData , com . microsoft . azure . sdk . iot . device . MessageType . D... | org . junit . Assert . assertEquals ( msg . getStatus ( ) , "12" ) |
testValidateBusinessObjectDefinitionKey ( ) { org . finra . herd . model . api . xml . BusinessObjectDefinitionKey businessObjectDefinitionKey = new org . finra . herd . model . api . xml . BusinessObjectDefinitionKey ( BDEF_NAMESPACE , BDEF_NAME ) ; when ( alternateKeyHelper . validateStringParameter ( "namespace" , o... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionKey ( BDEF_NAMESPACE , BDEF_NAME ) , businessObjectDefinitionKey ) |
testPut2Remove2Remove2Put1 ( ) { map2 . put ( 1 , 1 , ( ( byte ) ( 2 ) ) , 1399459457425L ) ; map2 . remove ( 1 , null , ( ( byte ) ( 2 ) ) , 1399459457425L ) ; map2 . remove ( 1 , null , ( ( byte ) ( 2 ) ) , 1399459457426L ) ; map1 . put ( 1 , 895 , ( ( byte ) ( 1 ) ) , 1399459457426L ) ; waitTillEqual ( 5000 ) ; "<As... | org . junit . Assert . assertEquals ( map1 , map2 ) |
returnsNullIfHeaderDoesNotContainsCookie ( ) { javax . ws . rs . core . Cookie cookie = cookieHeaderDelegate . fromString ( "" ) ; "<AssertPlaceHolder>" ; } fromString ( java . lang . String ) { if ( header == null ) { throw new java . lang . IllegalArgumentException ( ) ; } return org . everrest . core . impl . header... | org . junit . Assert . assertNull ( cookie ) |
testBatchQueryExecution ( ) { final java . net . URL url = getClass ( ) . getClassLoader ( ) . getResource ( "test-data.csv" ) ; java . util . Objects . requireNonNull ( url ) ; final java . util . Map < java . lang . String , java . lang . String > replaceVars = new java . util . HashMap ( ) ; replaceVars . put ( "$VA... | org . junit . Assert . assertTrue ( desc . isMaterialized ( ) ) |
ex22 ( ) { int seed = java . lang . Math . abs ( ( ( int ) ( new java . util . Date ( ) . getTime ( ) ) ) ) ; int randomWaitingPeriod = getRandomMiliseconds ( ) ; int timestamp = seed + randomWaitingPeriod ; int guessedSeed = set . discoverTimestampUsedAsSeed ( new org . meri . matasano . utils . encryption . MerseneTw... | org . junit . Assert . assertEquals ( seed , guessedSeed ) |
emptyString_selector__should_return_EMPTY_element_set ( ) { io . github . seleniumquery . SeleniumQueryObject targetSQO = testinfrastructure . testdouble . io . github . seleniumquery . SeleniumQueryObjectMother . createStubSeleniumQueryObjectWithAtLeastOneElement ( ) ; io . github . seleniumquery . SeleniumQueryObject... | org . junit . Assert . assertThat ( resultSQO . get ( ) , empty ( ) ) |
testAnyNamespace ( ) { java . util . Map < java . lang . String , java . lang . String > envVars = new java . util . HashMap ( io . strimzi . operator . cluster . ClusterOperatorConfigTest . envVars ) ; envVars . put ( ClusterOperatorConfig . STRIMZI_NAMESPACE , "*" ) ; io . strimzi . operator . cluster . ClusterOperat... | org . junit . Assert . assertEquals ( new java . util . HashSet ( asList ( "*" ) ) , config . getNamespaces ( ) ) |
testNext ( ) { java . util . Iterator < java . lang . Long > i = new org . kocakosm . pitaya . collection . UnmodifiableIterator < java . lang . Long > ( iterator ( 1L ) ) ; "<AssertPlaceHolder>" ; } valueOf ( java . math . BigInteger ) { return new org . kocakosm . pitaya . math . Fraction ( val , java . math . BigInt... | org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 1L ) , i . next ( ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . asset . entry . rel . model . AssetEntryAssetCategoryRel newAssetEntryAssetCategoryRel = addAssetEntryAssetCategoryRel ( ) ; com . liferay . asset . entry . rel . model . AssetEntryAssetCategoryRel existingAssetEntryAssetCategoryRel = _persistence . fetchByPrimaryKey ... | org . junit . Assert . assertEquals ( existingAssetEntryAssetCategoryRel , newAssetEntryAssetCategoryRel ) |
testRegisterValidExternalSession ( ) { org . openqa . selenium . server . BrowserSessionFactory factory = getTestSessionFactory ( ) ; org . openqa . selenium . server . BrowserSessionFactory . BrowserSessionInfo info1 = getTestSession1 ( ) ; factory . registerExternalSession ( info1 ) ; "<AssertPlaceHolder>" ; } hasAct... | org . junit . Assert . assertTrue ( factory . hasActiveSession ( info1 . sessionId ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . asset . kernel . model . AssetVocabulary newAssetVocabulary = addAssetVocabulary ( ) ; com . liferay . asset . kernel . model . AssetVocabulary existingAssetVocabulary = _persistence . fetchByPrimaryKey ( newAssetVocabulary . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertEquals ( existingAssetVocabulary , newAssetVocabulary ) |
testCreate ( ) { org . oscarehr . hospitalReportManager . model . HRMDocumentComment entity = new org . oscarehr . hospitalReportManager . model . HRMDocumentComment ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHol... | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
testMapWithInputTypeSpecified ( ) { org . apache . hadoop . conf . Configuration conf = mapDriver . getConfiguration ( ) ; conf . set ( "model.uri" , edu . isi . karma . mapreduce . driver . TestN3MapReduce . class . getClassLoader ( ) . getResource ( "people-model.ttl" ) . toURI ( ) . toString ( ) ) ; conf . set ( "ka... | org . junit . Assert . assertTrue ( ( ( results . size ( ) ) > 1 ) ) |
testRemove ( ) { com . liferay . journal . model . JournalArticleLocalization newJournalArticleLocalization = addJournalArticleLocalization ( ) ; _persistence . remove ( newJournalArticleLocalization ) ; com . liferay . journal . model . JournalArticleLocalization existingJournalArticleLocalization = _persistence . fet... | org . junit . Assert . assertNull ( existingJournalArticleLocalization ) |
validate_currentTimeIsSet_returnsTrue ( ) { confirmation . setCurrentTime ( java . util . Calendar . getInstance ( ) ) ; boolean isValid = confirmation . validate ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { return true ; } | org . junit . Assert . assertThat ( isValid , org . hamcrest . CoreMatchers . is ( true ) ) |
testFindBoundaryCases1 ( ) { java . util . regex . Pattern pat = java . util . regex . Pattern . compile ( ".*\n" ) ; java . util . regex . Matcher mat = pat . matcher ( "a\n" ) ; mat . find ( ) ; "<AssertPlaceHolder>" ; } group ( ) { return group ( 0 ) ; } | org . junit . Assert . assertEquals ( "a\n" , mat . group ( ) ) |
testCB ( ) { kontraktor . BasicTest . FutureTest futureTest = AsActor ( kontraktor . BasicTest . FutureTest . class ) ; java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; futureTest . testCB ( ( r , e ) -> { if ( kontraktor . Actors . isResult ( e ) )... | org . junit . Assert . assertTrue ( ( ( count . get ( ) ) == 3 ) ) |
testBuildTableNameNonRootServicePathDataModelByServicePath ( ) { System . out . println ( ( ( ( getTestTraceHead ( "[NGSICartoDBSink.buildTableName]" ) ) + "--------<sp>When<sp>a<sp>non<sp>root<sp>service-path<sp>is<sp>notified/defaulted<sp>and<sp>data_model<sp>is<sp>" ) + "'dm-by-service-path'<sp>the<sp>CartoDB<sp>tab... | org . junit . Assert . assertEquals ( expecetedTableName , builtTableName ) |
captureAfterNewLineHasGroupNumberOne ( ) { final java . lang . String lineBreak = "\n" ; final java . lang . String some = "some" ; final java . lang . String text = "<sp>text" ; final ru . lanwen . verbalregex . VerbalExpression expression = ru . lanwen . verbalregex . VerbalExpression . regex ( ) . lineBreak ( ) . ca... | org . junit . Assert . assertThat ( some , org . hamcrest . CoreMatchers . equalTo ( expression . getText ( ( ( lineBreak + some ) + text ) , 1 ) ) ) |
testGetTemplateFileNameNonTemplateFile ( ) { final java . lang . String input = "/wordpress/README.md" ; final java . lang . String output = org . microbean . helm . chart . StreamOrientedChartLoader . getTemplateFileName ( input ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNull ( output ) |
dispatchVServerManualOperation_VSERVER_MODIFICATION ( ) { paramHandler . setOperation ( Operation . VSERVER_MODIFICATION ) ; setParameters ( ) ; org . oscm . app . iaas . data . FlowState newState = null ; doReturn ( "" ) . when ( platformService ) . getEventServiceUrl ( ) ; newState = vServerProcessor . dispatchVServe... | org . junit . Assert . assertEquals ( FlowState . FINISHED , newState ) |
testCosh ( ) { org . nd4j . linalg . api . ndarray . INDArray in = org . nd4j . linalg . factory . Nd4j . linspace ( ( - 2 ) , 2 , 20 ) ; org . nd4j . linalg . api . ndarray . INDArray out = org . nd4j . linalg . ops . transforms . Transforms . cosh ( in , true ) ; org . nd4j . linalg . api . ndarray . INDArray exp = o... | org . junit . Assert . assertEquals ( exp , out ) |
testUniqueAlgorithmAndBegin ( ) { de . metanome . backend . results_db . HibernateUtil . clear ( ) ; long begin1 = new java . util . Date ( ) . getTime ( ) ; de . metanome . backend . results_db . Algorithm algorithm = new de . metanome . backend . results_db . Algorithm ( "example_ind_algorithm.jar" ) ; de . metanome ... | org . junit . Assert . assertTrue ( ( begin1 != begin2 ) ) |
testOverload6 ( ) { fr . inria . corese . core . Graph g = fr . inria . corese . core . Graph . create ( ) ; java . lang . String i = "if<sp>(datatype(?a)<sp>=<sp>us:m,<sp>us:value(?a)," 6 + ( ( ( "us:t1<sp>us:length<sp>'1'^^us:km<sp>" + "us:t2<sp>us:length<sp>'1000'^^us:m<sp>" ) + "@type<sp>us:m<sp>" 6 ) + "@type<sp>u... | org . junit . Assert . assertEquals ( 16 , map . size ( ) ) |
non_strict_wip_with_failed_scenarios ( ) { createNonStrictWipExitStatus ( ) ; bus . send ( testCaseFinishedWithStatus ( Result . Type . FAILED ) ) ; "<AssertPlaceHolder>" ; } exitStatus ( ) { if ( results . isEmpty ( ) ) { return cucumber . runtime . ExitStatus . DEFAULT ; } if ( runtimeOptions . isWip ( ) ) { return m... | org . junit . Assert . assertEquals ( 0 , exitStatus . exitStatus ( ) ) |
testHKeys ( ) { doCmdTest ( new org . cyy . fw . nedis . test . cmd . TestAction ( ) { @ org . cyy . fw . nedis . test . cmd . Override public void doTest ( ) throws org . cyy . fw . nedis . test . cmd . InterruptedException , org . cyy . fw . nedis . util . NedisException { client . flushAll ( null ) ; java . lang . T... | org . junit . Assert . assertEquals ( 0 , result . length ) |
testFormatParser_simple_3 ( ) { final com . ericsson . otp . erlang . OtpErlangObject value = org . erlide . util . erlang . OtpErlang . format ( "~x" ) ; final com . ericsson . otp . erlang . OtpErlangObject expected = org . erlide . util . erlang . OtpErlang . parse ( "~x" ) ; "<AssertPlaceHolder>" ; } parse ( java .... | org . junit . Assert . assertEquals ( expected , value ) |
testGetMap ( ) { org . ojai . Document document = org . ojai . json . Json . newDocument ( ) ; java . util . Map < java . lang . String , java . lang . Object > map = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; map . put ( "a" , 1 ) ; map . put ( "b" , "A" ) ; document . set ( "map" ... | org . junit . Assert . assertEquals ( map , document . getMap ( "map" ) ) |
withOuterTransaction_expect_currentTransactionAvailable ( ) { outerTxn = null ; io . ebean . Ebean . beginTransaction ( ) ; try { new org . tests . transaction . TestTransactionalSupports . SomeTransactionalWithSupports ( ) . doStuff ( ) ; "<AssertPlaceHolder>" ; } finally { io . ebean . Ebean . endTransaction ( ) ; } ... | org . junit . Assert . assertNotNull ( outerTxn ) |
callWithOutParameter ( ) { cancelForVersion ( 10 , 2 , 2 ) ; cancelForVersion ( 10 , 2 , 3 ) ; cancelForVersion ( 10 , 2 , 4 ) ; createProcedure ( "prepareStmtWithOutParameter" , ( "(x<sp>int,<sp>INOUT<sp>y<sp>int)\n" + ( "BEGIN\n" + "SELECT<sp>1;end\n" ) ) ) ; java . sql . CallableStatement callableStatement = sharedC... | org . junit . Assert . assertEquals ( 3 , callableStatement . getInt ( 2 ) ) |
testAvroToDiShort ( ) { java . lang . String expectedType = "id_Short" ; org . apache . avro . Schema fieldSchema = org . talend . daikon . avro . AvroUtils . _short ( ) ; "<AssertPlaceHolder>" ; } avroToDi ( org . apache . avro . Schema ) { org . apache . avro . Schema typeSchema = org . talend . daikon . avro . AvroU... | org . junit . Assert . assertEquals ( expectedType , org . talend . codegen . converter . TypeConverter . avroToDi ( fieldSchema ) ) |
DestinationStateIsDynamic ( ) { com . github . oxo42 . stateless4j . StateMachineConfig < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > config = new com . github . oxo42 . stateless4j . StateMachineConfig ( ) ; config . configure ( State . A ) . permitDynamic ( Trigger . X ... | org . junit . Assert . assertEquals ( State . B , sm . getState ( ) ) |
understandsSimpleFile ( ) { java . lang . String code = "@isTest\n<sp>public<sp>class<sp>SimpleClass<sp>{\n" + ( ( ( "<sp>@isTest\n<sp>public<sp>static<sp>void<sp>testAnything()<sp>{\n" + "<sp>\n" ) + "<sp>}\n" ) + "}" ) ; net . sourceforge . pmd . lang . apex . ast . ApexNode < apex . jorje . semantic . ast . compilat... | org . junit . Assert . assertEquals ( 4 , methods . size ( ) ) |
getAllAvatarsExpectEmtpyList ( ) { net . jforum . repository . AvatarRepository dao = this . newDao ( ) ; "<AssertPlaceHolder>" ; } getAll ( ) { return session . createCriteria ( this . persistClass ) . setCacheable ( true ) . setCacheRegion ( "avatarDAO" ) . setComment ( "avatarDAO.getAllAvatar" ) . list ( ) ; } | org . junit . Assert . assertEquals ( 0 , dao . getAll ( ) . size ( ) ) |
testCycleC ( ) { org . eclipse . aether . graph . DependencyNode root = parseResource ( "cycle-c.txt" ) ; "<AssertPlaceHolder>" ; expectScope ( "runtime" , root , 0 ) ; expectScope ( "runtime" , root , 0 , 0 ) ; expectScope ( "runtime" , root , 1 ) ; expectScope ( "runtime" , root , 1 , 0 ) ; } parseResource ( java . l... | org . junit . Assert . assertSame ( root , transform ( root ) ) |
whenDeprecatedTypeOfAnnotationOnActionNotReturningCollection ( ) { class Order { } class Customer { @ org . apache . isis . applib . annotation . TypeOf ( Order . class ) public Customer someAction ( ) { return null ; } } final java . lang . Class < ? > cls = Customer . class ; actionMethod = findMethod ( cls , "someAc... | org . junit . Assert . assertNull ( facet ) |
contains ( ) { org . opencb . cellbase . core . api . XRefDBAdaptor xRefDBAdaptor = dbAdaptorFactory . getXRefDBAdaptor ( "hsapiens" , "GRCh37" ) ; org . opencb . commons . datastore . core . QueryResult xrefs = xRefDBAdaptor . contains ( "BRCA2" , new org . opencb . commons . datastore . core . QueryOptions ( ) ) ; ja... | org . junit . Assert . assertEquals ( reference , set ) |
service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithNonEmptyBody ( ) { final com . azure . common . entities . HttpBinJSON result = createService ( com . azure . common . implementation . RestProxyTests . Service19 . class ) . putWithHeaderApplicationOctetStreamContentTypeAndStringBody ( "penguins" ... | org . junit . Assert . assertEquals ( "penguins" , result . data ) |
testRegistreerErkenning ( ) { initMocks ( nl . bzk . brp . model . bijhouding . RegistreerErkenningBericht . class , SoortBericht . BHG_AFS_REGISTREER_ERKENNING ) ; initBerichtVerwerker ( new java . util . ArrayList < nl . bzk . brp . model . validatie . Melding > ( ) , nl . bzk . brp . bijhouding . business . dto . bi... | org . junit . Assert . assertEquals ( testBericht , resultaat ) |
testGuestEnglishSessionPathWithSpanishCookieAlgorithm3 ( ) { java . lang . String prependI18nLanguageId = getPrependI18nLanguageId ( 3 , null , LocaleUtil . US , LocaleUtil . SPAIN ) ; "<AssertPlaceHolder>" ; } getPrependI18nLanguageId ( int , java . util . Locale , java . util . Locale , java . util . Locale ) { javax... | org . junit . Assert . assertNull ( prependI18nLanguageId ) |
testDifferentVolumeLock ( ) { org . apache . hadoop . ozone . om . OzoneManagerLock lock = new org . apache . hadoop . ozone . om . OzoneManagerLock ( new org . apache . hadoop . hdds . conf . OzoneConfiguration ( ) ) ; lock . acquireVolumeLock ( "volOne" ) ; lock . acquireVolumeLock ( "volTwo" ) ; lock . releaseVolume... | org . junit . Assert . assertTrue ( true ) |
testIsValidDirectoryNotReadable ( ) { java . io . File file = new java . io . File ( "file" ) { @ net . holmes . core . common . Override public boolean isDirectory ( ) { return true ; } @ net . holmes . core . common . Override public boolean canRead ( ) { return false ; } } ; "<AssertPlaceHolder>" ; } isValidDirector... | org . junit . Assert . assertFalse ( isValidDirectory ( file ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.