input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testWorkdirIsParentDir_CreateRepositoryFromDotGitGitDir ( ) { java . io . File gitDir = getFile ( "workdir" , Constants . DOT_GIT ) ; org . eclipse . jgit . lib . Repository repo = new org . eclipse . jgit . storage . file . FileRepositoryBuilder ( ) . setGitDir ( gitDir ) . build ( ) ; java . lang . String workdir = r... | org . junit . Assert . assertEquals ( workdir , "workdir" ) |
intValueFunctionToComparator ( ) { org . eclipse . collections . api . list . MutableList < java . lang . Integer > list = org . eclipse . collections . impl . list . Interval . oneTo ( 100 ) . toList ( ) . shuffleThis ( ) ; org . eclipse . collections . api . block . function . Function < java . lang . Integer , java ... | org . junit . Assert . assertEquals ( org . eclipse . collections . impl . list . Interval . oneTo ( 100 ) . toList ( ) , list ) |
shouldFindChildrenByMotherCaseId ( ) { org . ei . drishti . domain . Child firstChild = new org . ei . drishti . domain . Child ( "CASE-1" , "MOTHER-CASE-1" , "bcg" , "3" , "male" ) . withAnm ( "ANM<sp>ID<sp>1" ) ; org . ei . drishti . domain . Child secondChild = new org . ei . drishti . domain . Child ( "CASE-2" , "M... | org . junit . Assert . assertEquals ( asList ( firstChild , secondChild , thirdChild ) , childrenFromDB ) |
testVerhuizing ( ) { initMocks ( nl . bzk . brp . model . bijhouding . RegistreerVerhuizingBericht . class , SoortBericht . BHG_VBA_REGISTREER_VERHUIZING ) ; initBerichtVerwerker ( new java . util . ArrayList < nl . bzk . brp . model . validatie . Melding > ( ) , nl . bzk . brp . bijhouding . business . dto . bijhoudin... | org . junit . Assert . assertEquals ( testBericht , resultaat ) |
testGetSuspendingTriggerDefinitionOneHit ( ) { final org . oscm . domobjects . Organization org = createOrgAndSetTriggerDefinition ( true , true ) ; runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { public org . oscm . domobjects . Void call ( ) throws org . oscm . domobjects . Exception { or... | org . junit . Assert . assertNotNull ( suspendingTriggerDefinition ) |
equalsTest4 ( ) { org . opendaylight . openflowjava . nx . api . NiciraActionSerializerKey obj = new org . opendaylight . openflowjava . nx . api . NiciraActionSerializerKey ( org . opendaylight . openflowjava . nx . api . NiciraActionSerializerKeyTest . VERSION , org . opendaylight . openflowjava . nx . api . NiciraAc... | org . junit . Assert . assertFalse ( niciraActionSerializerKey . equals ( obj ) ) |
testFetchResourcesWithNestedAttributesAndTypes ( ) { io . katharsis . queryspec . QuerySpec querySpec = new io . katharsis . queryspec . QuerySpec ( io . katharsis . meta . model . resource . MetaResource . class ) ; io . katharsis . queryspec . QuerySpec dataObjectSpec = querySpec . getOrCreateQuerySpec ( io . kathars... | org . junit . Assert . assertFalse ( list . isEmpty ( ) ) |
testDelete ( ) { io . hops . erasure_coding . Codec . initializeCodecs ( getConfig ( ) ) ; io . hops . metadata . hdfs . entity . EncodingPolicy policy = new io . hops . metadata . hdfs . entity . EncodingPolicy ( "src" , ( ( short ) ( 1 ) ) ) ; io . hops . erasure_coding . Util . createRandomFile ( dfs , testFile , se... | org . junit . Assert . assertFalse ( dfs . exists ( parityPath ) ) |
testShiftNullBoolean ( ) { final boolean [ ] array = null ; org . apache . commons . lang3 . ArrayUtils . shift ( array , 1 ) ; "<AssertPlaceHolder>" ; } shift ( java . lang . Object [ ] , int ) { if ( array == null ) { return ; } org . apache . commons . lang3 . ArrayUtils . shift ( array , 0 , array . length , offset... | org . junit . Assert . assertNull ( array ) |
build_state_should_always_be_success ( ) { fr . norad . visuwall . api . domain . SoftwareProjectId softwareProjectId = new fr . norad . visuwall . api . domain . SoftwareProjectId ( "projectId" ) ; fr . norad . visuwall . api . domain . BuildState state = sonar . getBuildState ( softwareProjectId , 1 ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( BuildState . SUCCESS , state ) |
testValidateUrl_SubdomainAndPath ( ) { boolean result = org . oscm . validator . ADMValidator . isUrl ( "http://subdomain.domain.de/path" ) ; "<AssertPlaceHolder>" ; } isUrl ( java . lang . String ) { return org . oscm . validator . ADMValidator . URL_VALIDATOR . isValid ( value ) ; } | org . junit . Assert . assertTrue ( result ) |
testFileUtilNotIdenticalDirs2 ( ) { java . nio . file . Path left = _tempDir . newFolder ( "left_dir" ) . toPath ( ) ; java . nio . file . Path right = _tempDir . newFolder ( "right_dir" ) . toPath ( ) ; java . nio . file . Path left_file = java . nio . file . Files . createFile ( left . resolve ( "file1" ) ) ; java . ... | org . junit . Assert . assertFalse ( com . github . perlundq . yajsync . test . FileUtil . isDirectoriesIdentical ( left , right ) ) |
testDescribeOptimizeAdviceOnMissIndex ( ) { try { com . fit2cloud . aliyun . rds . model . request . DescribeOptimizeAdviceOnMissIndexRequest request = new com . fit2cloud . aliyun . rds . model . request . DescribeOptimizeAdviceOnMissIndexRequest ( ) ; request . setDBInstanceId ( dBInstanceId ) ; com . fit2cloud . ali... | org . junit . Assert . assertTrue ( true ) |
isDataAvailable ( ) { bean . buf = data ; "<AssertPlaceHolder>" ; } isDataAvailable ( ) { bean . buf = data ; org . junit . Assert . assertTrue ( bean . isDataAvailable ( ) ) ; } | org . junit . Assert . assertTrue ( bean . isDataAvailable ( ) ) |
testDocsForMissingSystemApi ( ) { final org . apache . nifi . registry . extension . component . manifest . ExtensionManifest extensionManifest = parse ( "src/test/resources/descriptors/extension-manifest-missing-sys-api.xml" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { try ( final java . io . InputSt... | org . junit . Assert . assertNotNull ( extensionManifest ) |
constructor_withRateLimitSetZero_shouldResetBackoffTimeLimit ( ) { com . mopub . network . RequestRateTrackerTest . prepareRequestRateTracker ( adUnitId , 99 , "some_reason" ) ; org . json . JSONObject jsonObject = com . mopub . network . MultiAdResponseTest . createJsonBody ( com . mopub . network . MultiAdResponseTes... | org . junit . Assert . assertNull ( record ) |
testGetSink ( ) { org . talend . components . marklogic . runtime . input . MarkLogicInputSink inputSink = new org . talend . components . marklogic . runtime . input . MarkLogicInputSink ( ) ; org . talend . components . marklogic . runtime . input . MarkLogicInputWriteOperation inputWriteOperation = inputSink . creat... | org . junit . Assert . assertEquals ( inputSink , inputWriteOperation . getSink ( ) ) |
insert_a_article_list ( ) { java . util . List < me . yufan . gossip . mybatis . entity . Article > articles = java . util . stream . IntStream . range ( 0 , 5 ) . boxed ( ) . map ( ( i ) -> randomArticle ( ) ) . collect ( toList ( ) ) ; mapper . batchInsert ( articles ) ; long failedCount = articles . stream ( ) . fil... | org . junit . Assert . assertThat ( failedCount , org . hamcrest . core . Is . is ( 0L ) ) |
test_plusWeeks_noChange_same ( ) { java . time . LocalDate t = TEST_2007_07_15 . plusWeeks ( 0 ) ; "<AssertPlaceHolder>" ; } plusWeeks ( long ) { return plusDays ( java . lang . Math . multiplyExact ( weeksToAdd , 7 ) ) ; } | org . junit . Assert . assertSame ( t , TEST_2007_07_15 ) |
testCastIncorrect ( ) { org . hawkular . apm . instrumenter . RuleHelper helper = new org . hawkular . apm . instrumenter . RuleHelper ( null ) ; org . hawkular . apm . instrumenter . RuleHelperTest . TestObject1 to1 = new org . hawkular . apm . instrumenter . RuleHelperTest . TestObject1 ( ) ; org . hawkular . apm . i... | org . junit . Assert . assertNull ( to2 ) |
testPartition ( ) { org . apache . tajo . catalog . Schema schema = org . apache . tajo . catalog . SchemaBuilder . builder ( ) . add ( "l_returnflag" , Type . TEXT ) . add ( "l_linestatus" , Type . TEXT ) . build ( ) ; org . apache . tajo . catalog . SortSpec [ ] sortSpecs = org . apache . tajo . plan . util . Planner... | org . junit . Assert . assertTrue ( ( ( prev . compareTo ( r ) ) < 0 ) ) |
rootCanNeverHaveAListener ( ) { io . grpc . Context root = io . grpc . Context . current ( ) ; root . addListener ( cancellationListener , com . google . common . util . concurrent . MoreExecutors . directExecutor ( ) ) ; "<AssertPlaceHolder>" ; } listenerCount ( ) { synchronized ( this ) { return ( listeners ) == null... | org . junit . Assert . assertEquals ( 0 , root . listenerCount ( ) ) |
testProperties ( ) { java . util . Map < java . lang . String , java . lang . String > properties = java . util . Collections . singletonMap ( "test" , "test_value" ) ; runtime = new org . apache . cayenne . configuration . rop . client . ClientRuntimeBuilder ( ) . properties ( properties ) . build ( ) ; java . util . ... | org . junit . Assert . assertEquals ( properties , injectedProperties ) |
testBuildWithDisabledSecurityConstraintWithOrderBy ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . enrolment . enrolment . subject . EnrolmentEnrolmentSubject context = new org . lnu . is . domain . enrolment . enrolment . subject . EnrolmentEnrolmentSubject ( ) ; org . lnu . is . pagination . OrderBy or... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testTransformWithEmptyListReturnEmptyList ( ) { java . util . List < java . lang . String > returnValue = breakTransformer . transform ( new java . util . ArrayList < java . lang . String > ( ) ) . getTransformedData ( ) ; java . util . List < java . lang . String > expected = new java . util . ArrayList ( ) ; "<Assert... | org . junit . Assert . assertEquals ( expected , returnValue ) |
injectionValidatorFactory ( ) { final javax . validation . ValidatorFactory validatorFactory = persistManager . getValidatorFactory ( ) ; "<AssertPlaceHolder>" ; } getValidatorFactory ( ) { return validatorFactory ; } | org . junit . Assert . assertNotNull ( validatorFactory ) |
givenMap_whenEqualsAndHashCodeOverridden_thenNoMemoryLeak ( ) { java . util . Map < com . baeldung . memoryleaks . equalshashcode . PersonOptimized , java . lang . Integer > map = new java . util . HashMap < com . baeldung . memoryleaks . equalshashcode . PersonOptimized , java . lang . Integer > ( ) ; for ( int i = 0 ... | org . junit . Assert . assertTrue ( ( ( map . size ( ) ) == 1 ) ) |
proxyIsAdded ( ) { org . openqa . grid . internal . GridRegistry registry = de . zalando . ep . zalenium . registry . ZaleniumRegistry . newInstance ( new org . openqa . grid . web . Hub ( new org . openqa . grid . internal . utils . configuration . GridHubConfiguration ( ) ) , new org . openqa . grid . internal . Prox... | org . junit . Assert . assertEquals ( 4 , registry . getAllProxies ( ) . size ( ) ) |
testLoadingDfsUsedForVolumes ( ) { long waitIntervalTime = 5000 ; long cachedDfsUsedIntervalTime = waitIntervalTime + 1000 ; conf . setLong ( org . apache . hadoop . hdfs . DFSConfigKeys . DFS_DN_CACHED_DFSUSED_CHECK_INTERVAL_MS , cachedDfsUsedIntervalTime ) ; long cacheDfsUsed = 1024 ; long dfsUsed = getDfsUsedValueOf... | org . junit . Assert . assertEquals ( cacheDfsUsed , dfsUsed ) |
testConnectionTriggersNonFatalException ( ) { final java . sql . Connection mockConnection = createNiceMock ( java . sql . Connection . class ) ; com . jolbox . bonecp . TestRobustness . driver = new com . jolbox . bonecp . MockJDBCDriver ( new com . jolbox . bonecp . MockJDBCAnswer ( ) { public java . sql . Connection... | org . junit . Assert . assertEquals ( "FOO" , e . getMessage ( ) ) |
test ( ) { victim = new ro . isdc . wro . http . handler . LazyRequestHandlerDecorator ( new ro . isdc . wro . util . LazyInitializer < ro . isdc . wro . http . handler . RequestHandler > ( ) { @ ro . isdc . wro . http . handler . Override protected ro . isdc . wro . http . handler . RequestHandler initialize ( ) { ret... | org . junit . Assert . assertTrue ( victim . isEnabled ( ) ) |
readWordsFromFileTest ( ) { edu . brown . cs . tbhargav . fileparsers . ExtWordsFileParser fReader = new edu . brown . cs . tbhargav . fileparsers . ExtWordsFileParser ( "other" 6 ) ; java . util . List < java . lang . String > wordsRead = new java . util . ArrayList < java . lang . String > ( ) ; try { wordsRead = fRe... | org . junit . Assert . assertTrue ( s . equalsIgnoreCase ( t ) ) |
testValueOf2 ( ) { eu . bitwalker . useragentutils . UserAgent userAgent = eu . bitwalker . useragentutils . UserAgent . parseUserAgentString ( "Mozilla/4.0<sp>(compatible;<sp>MSIE<sp>6.0;<sp>Windows<sp>NT<sp>5.2;<sp>SV1;<sp>.NET<sp>CLR<sp>1.1.4322;<sp>.NET<sp>CLR<sp>2.0.50727)" ) ; eu . bitwalker . useragentutils . Us... | org . junit . Assert . assertEquals ( userAgent , retrievedUserAgent ) |
testOnDeletePresentThingy ( ) { de . jethroo . rest . example . Thingy thingy = new de . jethroo . rest . example . Thingy ( "something" ) ; dao . insert ( thingy ) ; javax . ws . rs . core . Response response = service . onDelete ( thingy . getId ( ) ) ; de . jethroo . rest . example . Thingy response_thingy = gson . ... | org . junit . Assert . assertEquals ( null , dao . findById ( response_thingy . getId ( ) ) ) |
testGetIndices ( ) { com . bah . culvert . mock . MockIndex ix1 = new com . bah . culvert . mock . MockIndex ( "foo" , 0 , true , "a" . getBytes ( ) , "b" . getBytes ( ) , "c" , "d" ) ; com . bah . culvert . mock . MockIndex ix2 = new com . bah . culvert . mock . MockIndex ( "bar" , 0 , true , "e" . getBytes ( ) , "f" ... | org . junit . Assert . assertNotNull ( client . getIndices ( ) ) |
stream_of_empty_optionals ( ) { java . util . stream . Stream < java . lang . String > names = java . util . stream . Stream . of ( "John" , "Susan" ) ; java . util . stream . Stream < java . lang . String > transformed = names . flatMap ( ( s ) -> com . codepoetics . protonpack . StreamUtils . stream ( java . util . O... | org . junit . Assert . assertEquals ( java . util . Collections . emptyList ( ) , results ) |
testRequestsExpecting100ContinueBehaviorShouldSetExpectHeader ( ) { final org . apache . hc . core5 . http . message . BasicClassicHttpRequest post = new org . apache . hc . core5 . http . message . BasicClassicHttpRequest ( "POST" , "/" ) ; post . setHeader ( HttpHeaders . EXPECT , HeaderElements . CONTINUE ) ; post .... | org . junit . Assert . assertTrue ( foundExpect ) |
testNormalizeTime ( ) { System . out . println ( "normalizeTime" ) ; long time = 0L ; kg . apc . jmeter . graphs . AbstractOverTimeVisualizer instance = new kg . apc . jmeter . graphs . AbstractOverTimeVisualizerTest . AbstractOverTimeVisualizerImpl ( ) ; long expResult = 0L ; long result = instance . normalizeTime ( t... | org . junit . Assert . assertEquals ( expResult , result ) |
useDaylightTime ( ) { "<AssertPlaceHolder>" ; } useDaylightTime ( ) { org . junit . Assert . assertFalse ( new org . apache . commons . lang3 . time . GmtTimeZone ( false , 0 , 0 ) . useDaylightTime ( ) ) ; } | org . junit . Assert . assertFalse ( new org . apache . commons . lang3 . time . GmtTimeZone ( false , 0 , 0 ) . useDaylightTime ( ) ) |
testExpectedOutputOneIssue ( ) { java . io . File file = new java . io . File ( "foo/bar.js" ) ; com . googlecode . jslint4java . Issue issue = new com . googlecode . jslint4java . Issue . IssueBuilder ( file . toString ( ) , 1 , 1 , "no<sp>clucking" ) . evidence ( "cluck()" ) . build ( ) ; issues . add ( issue ) ; run... | org . junit . Assert . assertThat ( out . toString ( ) , org . hamcrest . CoreMatchers . is ( sb . toString ( ) ) ) |
shouldWriteToTerminationLog ( ) { final java . nio . file . Path tempFile = java . nio . file . Files . createTempFile ( "termination-log-" , "" ) ; tempFile . toFile ( ) . deleteOnExit ( ) ; environmentVariables . set ( com . spotify . flo . contrib . styx . TerminationLoggingTest . STYX_TERMINATION_LOG , tempFile . t... | org . junit . Assert . assertThat ( content , org . hamcrest . Matchers . is ( expected ) ) |
test_bounce_unsigned_long ( ) { int result = server . bounce_unsigned_long ( 123456 ) ; "<AssertPlaceHolder>" ; } bounce_unsigned_long ( int ) { return x ; } | org . junit . Assert . assertEquals ( 123456 , result ) |
testResultsCountSummaryNoCount ( ) { "<AssertPlaceHolder>" ; } resultsCountSummary ( ) { java . lang . String s = null ; int total = totalResults ( ) ; if ( total >= 0 ) { int perPage = itemsPerPage ( ) ; int from = startIndex ( ) ; if ( ( ( perPage > 0 ) && ( from >= 0 ) ) && ( total > 0 ) ) { int to = ( from + perPag... | org . junit . Assert . assertNull ( page . resultsCountSummary ( ) ) |
getDomainCreatePermissions_validAsSystemResource ( ) { authenticateSystemResource ( ) ; final com . acciente . oacc . DomainCreatePermission domCreatePerm_superuser = com . acciente . oacc . DomainCreatePermissions . getInstance ( com . acciente . oacc . DomainPermissions . getInstance ( DomainPermissions . SUPER_USER ... | org . junit . Assert . assertThat ( domainCreatePermissions_post , org . hamcrest . CoreMatchers . is ( domainCreatePermissions_pre ) ) |
testRead ( ) { final com . google . common . util . concurrent . FluentFuture < ? extends org . opendaylight . mdsal . common . api . CommitInfo > fut = mdsalUtilsAsync . put ( LogicalDatastoreType . CONFIGURATION , org . opendaylight . ovsdb . utils . mdsal . utils . MdsalUtilsAsyncTest . TEST_IID , org . opendaylight... | org . junit . Assert . assertEquals ( org . opendaylight . ovsdb . utils . mdsal . utils . MdsalUtilsAsyncTest . DATA , optNode . get ( ) ) |
hamcrest_core_isEqual ( ) { java . lang . String spottedCreator = "New<sp>Glarus<sp>Brewing<sp>Company" ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( spottedCreator , org . hamcrest . CoreMatchers . equalTo ( "New<sp>Glarus<sp>Brewing<sp>Company" ) ) |
testBooleanNamedSheet ( ) { org . apache . poi . hssf . usermodel . HSSFWorkbook wb = new org . apache . poi . hssf . usermodel . HSSFWorkbook ( ) ; org . apache . poi . hssf . usermodel . HSSFSheet sheet = wb . createSheet ( "true" ) ; org . apache . poi . hssf . usermodel . HSSFCell cell = sheet . createRow ( 0 ) . c... | org . junit . Assert . assertEquals ( "'true'!B2" , cell . getCellFormula ( ) ) |
deveGerarXMLDeAcordoComOPadraoEstabelecidoBCAliquotaPercentual ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoPISOutrasOperacoes pisOutrasOperacoes = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoPISOutrasOperacoes ( ) ; pisOutrasOpe... | org . junit . Assert . assertEquals ( xmlEsperado , pisOutrasOperacoes . toString ( ) ) |
addTest ( ) { doNothing ( ) . when ( listPresenter ) . addToListElement ( any ( ) ) ; final java . util . List < org . kie . workbench . common . services . shared . kmodule . SingleValueItemObjectModel > objs = new java . util . ArrayList < org . kie . workbench . common . services . shared . kmodule . SingleValueItem... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( new org . kie . workbench . common . services . shared . kmodule . SingleValueItemObjectModel ( "foo" ) , new org . kie . workbench . common . services . shared . kmodule . SingleValueItemObjectModel ( "bar" ) , new org . kie . workbench . common . s... |
testRepository ( ) { com . example . readinglist . domain . Book book = new com . example . readinglist . domain . Book ( ) ; book . setAuthor ( "liangxifeng" ) ; book . setReader ( "zhansan" ) ; com . example . readinglist . domain . Book bookRes = bookList . save ( book ) ; com . example . readinglist . domain . Book... | org . junit . Assert . assertTrue ( "" , ( ( bookRead . getAuthor ( ) ) == "liangxifeng" ) ) |
getSensorsFromProvider ( ) { when ( jedisSequenceUtils . getPid ( org . sentilo . platform . service . test . service . ResourceServiceImplTest . PROVIDER_ID ) ) . thenReturn ( org . sentilo . platform . service . test . service . ResourceServiceImplTest . PID ) ; when ( jedisTemplate . sMembers ( service . getKeysBuil... | org . junit . Assert . assertNotNull ( members ) |
shouldFireEventWhenRosterReady ( ) { final com . calclab . emite . xtesting . handlers . RosterRetrievedTestHandler handler = new com . calclab . emite . xtesting . handlers . RosterRetrievedTestHandler ( ) ; roster . addRosterRetrievedHandler ( handler ) ; shouldRequestRosterOnLogin ( ) ; session . answerSuccess ( ser... | org . junit . Assert . assertTrue ( handler . isCalledOnce ( ) ) |
testIsInitialized_complete ( ) { com . hp . alm . ali . idea . model . Entity entity = new com . hp . alm . ali . idea . model . Entity ( "defect" , 1 ) ; entity . setComplete ( true ) ; com . hp . alm . ali . idea . tasks . HpAlmTask task = new com . hp . alm . ali . idea . tasks . HpAlmTask ( getProject ( ) , entity ... | org . junit . Assert . assertTrue ( task . isInitialized ( ) ) |
testAssertion ( ) { org . semanticweb . owlapi . util . HornAxiomVisitorEx testsubject = new org . semanticweb . owlapi . util . HornAxiomVisitorEx ( ) ; java . lang . Boolean result = object . accept ( testsubject ) ; "<AssertPlaceHolder>" ; } accept ( java . util . stream . Stream ) { org . semanticweb . owlapi . mod... | org . junit . Assert . assertEquals ( b , result ) |
queryProductDocumentsTest ( ) { java . lang . String query = "pids" 4 http : "declare<sp>variable<sp>$rid<sp>external;\n" ) + "<sp>let<sp>$props<sp>:=<sp>map<sp>{'method':<sp>'json'}\n" 6 ) + "let<sp>$pids<sp>:=<sp>(66751,<sp>98514,<sp>31386)\n" ) + "for<sp>$map<sp>in<sp>fn:collection(\"securities\"pids" 6 ) + "for<sp>... | org . junit . Assert . assertEquals ( 0 , cnt ) |
testDefinePermissionToAllowUpdateDataRecordCollection ( ) { com . liferay . portal . kernel . model . Role role1 = com . liferay . portal . kernel . test . util . RoleTestUtil . addRole ( RoleConstants . TYPE_REGULAR ) ; com . liferay . portal . kernel . model . User user1 = com . liferay . portal . kernel . test . uti... | org . junit . Assert . assertEquals ( deDataRecordCollection . getDEDataRecordCollectionId ( ) , deDataRecordCollectionAfterUpdate . getDEDataRecordCollectionId ( ) ) |
testNext ( ) { for ( int i = 1 ; i <= 100 ; i ++ ) { "<AssertPlaceHolder>" ; } } toString ( boolean ) { final java . lang . StringBuffer b = new java . lang . StringBuffer ( ) ; b . append ( encoding ) ; if ( org . mobicents . media . FormatUtils . specified ( sampleRate ) ) { b . append ( ( ",<sp>" + ( ( int ) ( sampl... | org . junit . Assert . assertEquals ( java . lang . Integer . toString ( i ) , range . next ( ) ) |
testGetParametersWithEmptyFieldsAndWithoutDefaults ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . person . pension . PersonPension entity = new org . lnu . is . domain . person . pension . PersonPension ( ) ; java . util . Map < java . lang . String , java . lang . Object > ... | org . junit . Assert . assertEquals ( expected , actual ) |
geenDatumIngang ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Bijhoudingsautorisatie bijhoudingsautorisatie = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Bijhoudingsautorisatie ( false ) ; "<AssertPlaceHolder>" ; } errorCount ( nl . bzk . algemeenbrp . dal . domein . brp . entity . T... | org . junit . Assert . assertEquals ( 1 , errorCount ( bijhoudingsautorisatie ) ) |
testBuild ( ) { org . lnu . is . domain . married . type . MarriedType context = new org . lnu . is . domain . married . type . MarriedType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>MarriedType<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testXCSWithoutKey2 ( ) { org . apache . pig . data . Tuple input = tupleFactory . newTuple ( 2 ) ; input . set ( 0 , "http://en.m.wikipedia.org/wiki/James_Ingram" ) ; input . set ( 1 , "250-99" ) ; org . wikimedia . analytics . kraken . pig . ZeroFilterFunc zero = new org . wikimedia . analytics . kraken . pig . ZeroFi... | org . junit . Assert . assertTrue ( zero . exec ( input ) ) |
testGetContentInfo ( ) { final org . apache . commons . vfs2 . FileSystemManager fsManager = org . apache . commons . vfs2 . VFS . getManager ( ) ; final org . apache . commons . vfs2 . FileObject fo = fsManager . resolveFile ( "http4://www.apache.org/licenses/LICENSE-2.0.txt" ) ; final org . apache . commons . vfs2 . ... | org . junit . Assert . assertNotNull ( content ) |
testConvertISOTZNoMillisecond ( ) { java . lang . String source = "2018-05-09T17:34:55-07:00" ; com . box . l10n . mojito . rest . textunit . StringToDateTimeConverter instance = new com . box . l10n . mojito . rest . textunit . StringToDateTimeConverter ( ) ; org . joda . time . DateTime expResult = new org . joda . t... | org . junit . Assert . assertEquals ( expResult , result ) |
shouldLoadAllVisibilityPropertiesWhenGetVisProperty ( ) { final java . lang . String group = uk . gov . gchq . gaffer . commonutil . TestGroups . ENTITY ; final org . apache . accumulo . core . data . Key key = mock ( org . apache . accumulo . core . data . Key . class ) ; final org . apache . accumulo . core . data . ... | org . junit . Assert . assertEquals ( "vis1" , property ) |
getVersion ( ) { "<AssertPlaceHolder>" ; } getVersion ( ) { org . junit . Assert . assertNotNull ( org . eol . globi . Version . getVersion ( ) ) ; } | org . junit . Assert . assertNotNull ( org . eol . globi . Version . getVersion ( ) ) |
testOrElseThrowWithPresentValue ( ) { long value = com . annimon . stream . OptionalLong . of ( 10 ) . orElseThrow ( ) ; "<AssertPlaceHolder>" ; } orElseThrow ( ) { if ( ( value ) == null ) { throw new java . util . NoSuchElementException ( "No<sp>value<sp>present" ) ; } return value ; } | org . junit . Assert . assertEquals ( 10 , value ) |
testToEightBitBinary ( ) { result1 = org . onosproject . isis . io . util . IsisUtil . toEightBitBinary ( "01" ) ; "<AssertPlaceHolder>" ; } length ( ) { return length ; } | org . junit . Assert . assertThat ( result1 . length ( ) , org . hamcrest . CoreMatchers . is ( 8 ) ) |
activeAfterEnter ( ) { statemachine . enter ( ) ; "<AssertPlaceHolder>" ; } isActive ( ) { return ( stateVector [ 0 ] ) != ( org . yakindu . src . operationcallbackimpl . OperationCallbackImplStatemachine . State . $NullState$ ) ; } | org . junit . Assert . assertTrue ( statemachine . isActive ( ) ) |
anySatisfy_executionException ( ) { try { this . classUnderTest ( ) . anySatisfy ( ( each ) -> { throw new java . lang . RuntimeException ( "Execution<sp>exception" ) ; } ) ; } catch ( java . lang . RuntimeException e ) { "<AssertPlaceHolder>" ; } } anySatisfy ( org . eclipse . collections . api . block . predicate . P... | org . junit . Assert . assertEquals ( "Execution<sp>exception" , e . getMessage ( ) ) |
testIpAddress ( ) { org . springframework . mock . web . MockHttpServletRequest request = new org . springframework . mock . web . MockHttpServletRequest ( ) ; request . setServerName ( "127.0.0.1" ) ; java . lang . String name = org . springframework . test . util . ReflectionTestUtils . invokeMethod ( cookieHelper , ... | org . junit . Assert . assertNull ( name ) |
factsFirstMissing ( ) { org . candlepin . model . Consumer first = new org . candlepin . model . Consumer ( ) ; first . setFact ( "key1" , "1" ) ; first . setFact ( "key3" , "3" ) ; org . candlepin . model . Consumer second = new org . candlepin . model . Consumer ( ) ; second . setFact ( "key1" , "1" ) ; second . setF... | org . junit . Assert . assertFalse ( first . factsAreEqual ( second . getFacts ( ) ) ) |
shouldCoerceMultipleFlavors ( ) { com . facebook . buck . core . model . BuildTarget seen = new com . facebook . buck . rules . coercer . BuildTargetTypeCoercer ( unconfiguredBuildTargetTypeCoercer ) . coerce ( createCellRoots ( filesystem ) , filesystem , basePath , EmptyTargetConfiguration . INSTANCE , "//foo:bar#baz... | org . junit . Assert . assertEquals ( com . facebook . buck . core . model . BuildTargetFactory . newInstance ( "//foo:bar#baz,qux" ) , seen ) |
testInsertBeforeIndex0 ( ) { org . antlr . tool . Grammar g = new org . antlr . tool . Grammar ( ( "lexer<sp>grammar<sp>t;\n" + ( ( "A<sp>:<sp>\'a\';\n" + "B<sp>:<sp>\'b\';\n" ) + "C<sp>:<sp>\'c\';\n" ) ) ) ; org . antlr . runtime . CharStream input = new org . antlr . runtime . ANTLRStringStream ( "abc" ) ; org . antl... | org . junit . Assert . assertEquals ( expecting , result ) |
testCodeOKInSwitch ( ) { org . apache . zookeeper . KeeperException . Code test = org . apache . zookeeper . KeeperException . Code . OK ; switch ( test ) { case OK : "<AssertPlaceHolder>" ; break ; } } | org . junit . Assert . assertTrue ( true ) |
setTslLocation ( ) { this . configuration . setTslLocation ( "tslLocation" ) ; "<AssertPlaceHolder>" ; } getTslLocation ( ) { java . lang . String urlString = getConfigurationParameter ( ConfigurationParameter . TslLocation ) ; if ( ! ( eu . europa . esig . dss . client . http . Protocol . isFileUrl ( urlString ) ) ) r... | org . junit . Assert . assertEquals ( "tslLocation" , this . configuration . getTslLocation ( ) ) |
testSelectStatementForSpecificColumns ( ) { java . sql . Connection conn = java . sql . DriverManager . getConnection ( getUrl ( ) , org . apache . phoenix . util . PropertiesUtil . deepCopy ( TestUtil . TEST_PROPERTIES ) ) ; final java . lang . String tableName = "TEST_TABLE" ; try { java . lang . String ddl = ( ( "CR... | org . junit . Assert . assertEquals ( expectedSelectStatement , selectStatement ) |
testExpression29 ( ) { java . lang . String expr = "24.3343<sp>%<sp>3" ; double expected = 24.3343 % 3 ; net . objecthunter . exp4j . Expression e = new net . objecthunter . exp4j . ExpressionBuilder ( expr ) . build ( ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { final net . objecthunter . exp4j . ArrayStack output = n... | org . junit . Assert . assertTrue ( ( expected == ( e . evaluate ( ) ) ) ) |
verifyCallbackFailure ( ) { final java . lang . String signature = "6yQRl17CNj5YSHSpF+tLjb0vVsNVEv021Tyy1bTVEQ69SWlmhwmJYuMc7jiDyeW9TLy4vRqSh4g4YEyN8eoQIM57pMoNw6Lw6Oudubqwp+E3cKtLFxW0l18db3Z/vhxn5BScAutHWwT/XrmkCNaHyCsvOOGMekwrNO7mxX9QIx21FBaEejJeviSYrF8bG6MbmFEs2VGKSybf9YrElR8BxxNe/uNfCXN3P5tO8MgR5wlL3Kr4yq8e6i4WWJgD... | org . junit . Assert . assertFalse ( cb . verifyCallback ( body , signature ) ) |
shouldStoreAndGetBackfill ( ) { com . spotify . styx . storage . DatastoreStorageTransaction tx = new com . spotify . styx . storage . DatastoreStorageTransaction ( com . spotify . styx . storage . DatastoreStorageTransactionTest . datastore . newTransaction ( ) ) ; final com . spotify . styx . model . Backfill backfil... | org . junit . Assert . assertThat ( newTx . backfill ( backfill . id ( ) ) , org . hamcrest . Matchers . is ( java . util . Optional . of ( backfill ) ) ) |
authorizeInteractionGivenGrantedConsentsSystemConsentsAreNotSpecified ( ) { when ( this . consentManager . getSystemConsents ( ) ) . thenReturn ( java . util . Collections . < org . phenotips . consents . Consent > emptySet ( ) ) ; final java . util . Set < java . lang . String > grantedConsents = new java . util . Has... | org . junit . Assert . assertTrue ( authorizeInteraction ) |
testHandle ( ) { java . lang . String msg = "No<sp>entity<sp>found" ; java . lang . IllegalArgumentException e = new java . lang . IllegalArgumentException ( msg ) ; org . lnu . is . resource . message . MessageResource expected = new org . lnu . is . resource . message . MessageResource ( ) ; expected . setMessageType... | org . junit . Assert . assertEquals ( expected , actual ) |
toString_PaneListWithTwoItems_SerializedAsPaneArray ( ) { com . vaadin . addon . charts . model . PaneList paneList = new com . vaadin . addon . charts . model . PaneList ( ) ; paneList . addPane ( new com . vaadin . addon . charts . model . Pane ( ) ) ; paneList . addPane ( new com . vaadin . addon . charts . model . ... | org . junit . Assert . assertEquals ( expected , toJSON ( object ) ) |
testChoiceIterator ( ) { net . sourceforge . tess4j . TessAPITest . logger . info ( "\t-<sp>" 0 ) ; java . lang . String filename = java . lang . String . format ( "%s/%s" , this . testResourcesDataPath , "eurotext.tif" ) ; java . io . File tiff = new java . io . File ( filename ) ; java . awt . image . BufferedImage i... | org . junit . Assert . assertTrue ( true ) |
testIntersection ( ) { org . locationtech . jts . geom . GeometryFactory fact = new org . locationtech . jts . geom . GeometryFactory ( ) ; final org . locationtech . jts . geom . LinearRing ring = fact . createLinearRing ( new org . locationtech . jts . geom . Coordinate [ ] { new org . locationtech . jts . geom . Coo... | org . junit . Assert . assertTrue ( ( expected == result ) ) |
testToString ( ) { org . locationtech . geogig . repository . Hints hints = new org . locationtech . geogig . repository . Hints ( ) ; hints . set ( "key1" , "value1" ) ; hints . set ( "key2" , "value2" ) ; "<AssertPlaceHolder>" ; } getAll ( ) { return new java . util . HashMap ( this . hintsMap ) ; } | org . junit . Assert . assertEquals ( hints . getAll ( ) . toString ( ) , hints . toString ( ) ) |
initializesVersionOnInsert ( ) { org . springframework . data . mongodb . core . PersonWithVersionPropertyOfTypeInteger person = new org . springframework . data . mongodb . core . PersonWithVersionPropertyOfTypeInteger ( ) ; person . firstName = "Dave" ; template . insert ( person ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( person . version , is ( 0 ) ) |
testDaylightSavingTime ( ) { org . joda . time . DateTime time = new org . joda . time . DateTime ( 2015 , 11 , 1 , 2 , 1 , io . confluent . connect . hdfs . partitioner . TimeBasedPartitionerTest . DATE_TIME_ZONE ) ; java . lang . String pathFormat = "'year='YYYY/'month='MMMM/'day='dd/'hour='H/" ; org . joda . time . ... | org . junit . Assert . assertEquals ( time1 . toString ( formatter ) , time2 . toString ( formatter ) ) |
testRemoveTaskNotExist ( ) { java . lang . Integer siteId = 1 ; java . lang . String taskId = "0" ; java . lang . String username = "test" ; com . ewcms . publication . task . Taskable task = mock ( com . ewcms . publication . task . Taskable . class ) ; when ( task . getId ( ) ) . thenReturn ( taskId ) ; when ( task .... | org . junit . Assert . assertFalse ( register . containsTask ( task ) ) |
shouldDeserialiseSourceDestinationValuesIncorrectWayRound ( ) { final uk . gov . gchq . gaffer . data . element . Edge edge = new uk . gov . gchq . gaffer . data . element . Edge . Builder ( ) . source ( "1" ) . dest ( "2" ) . directed ( true ) . group ( TestGroups . ENTITY ) . build ( ) ; final byte [ ] rowKey = conve... | org . junit . Assert . assertEquals ( EdgeDirection . DIRECTED_REVERSED , direction ) |
shouldOwnerWarningBeShownTest_OrgAdmin ( ) { org . oscm . ui . model . User owner = prepareSubOwnerWithRole ( "owner" , true , UserRoleType . ORGANIZATION_ADMIN ) ; model . setSelectedOwner ( owner ) ; boolean showOwnerWarning = ctrl . shouldOwnerWarningBeShown ( ) ; "<AssertPlaceHolder>" ; } shouldOwnerWarningBeShown ... | org . junit . Assert . assertFalse ( showOwnerWarning ) |
testCreateElasticSearchReporter ( ) { com . codahale . metrics . ScheduledReporter reporter = uk . gov . dstl . baleen . core . metrics . ReporterUtils . createElasticSearchReporter ( registry , new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( reporter ) |
testPreimageProof_ElGamal ( ) { ch . bfh . unicrypt . math . algebra . multiplicative . classes . GStarMod G_q = this . G_q1 ; ch . bfh . unicrypt . crypto . schemes . encryption . classes . ElGamalEncryptionScheme elgamal = ch . bfh . unicrypt . crypto . schemes . encryption . classes . ElGamalEncryptionScheme . getIn... | org . junit . Assert . assertTrue ( v ) |
testSerialization ( ) { com . orsoncharts . label . StandardCategoryLabelGenerator lg1 = new com . orsoncharts . label . StandardCategoryLabelGenerator ( ) ; com . orsoncharts . label . StandardCategoryLabelGenerator lg2 = ( ( com . orsoncharts . label . StandardCategoryLabelGenerator ) ( com . orsoncharts . TestUtils ... | org . junit . Assert . assertTrue ( lg1 . equals ( lg2 ) ) |
delete ( ) { final java . lang . String path = "/data" ; final org . sentilo . common . rest . RequestContext rc = new org . sentilo . common . rest . RequestContext ( path ) ; final java . lang . String responseContent = "Lorem<sp>ipsum" ; final org . apache . http . StatusLine statusLine = new org . apache . http . m... | org . junit . Assert . assertEquals ( responseContent , result ) |
testRunWithException ( ) { target = org . mockito . Mockito . spy ( new org . o3project . odenos . core . manager . system . SystemManager ( org . o3project . odenos . core . manager . system . SystemManagerTest . SYSTEM_MGR_ID , mockDispatcher , mockEventManagerProp ) ) ; java . util . HashMap < java . lang . String ,... | org . junit . Assert . assertThat ( resultList , org . hamcrest . CoreMatchers . is ( mockList ) ) |
testBigFileWithPauseAndResume ( ) { testFileComplete ( new com . am . jlfu . fileuploader . logic . UploadServletAsyncProcessorTest . RunnableInTheProcess ( ) { @ com . am . jlfu . fileuploader . logic . Override public void run ( ) throws com . am . jlfu . fileuploader . logic . InterruptedException , java . io . IOEx... | org . junit . Assert . assertThat ( new java . io . File ( absoluteFullPathOfUploadedFile ) . length ( ) , org . hamcrest . CoreMatchers . is ( length ) ) |
testZeroBaselineRateShouldBeUndefined ( ) { org . drugis . addis . entities . RateMeasurement base = new org . drugis . addis . entities . BasicRateMeasurement ( 0 , 100 ) ; org . drugis . addis . entities . RateMeasurement subj = new org . drugis . addis . entities . BasicRateMeasurement ( 50 , 100 ) ; org . drugis . ... | org . junit . Assert . assertFalse ( or . isDefined ( ) ) |
testTreePermissionCanRead ( ) { org . apache . jackrabbit . oak . spi . security . authorization . permission . TreePermission parentPermission = org . apache . jackrabbit . oak . spi . security . authorization . permission . TreePermission . EMPTY ; for ( java . lang . String path : TP_PATHS ) { org . apache . jackrab... | org . junit . Assert . assertTrue ( tp . canRead ( ) ) |
test2Alts ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( ( "s\n" + "@init<sp>{setBuildParseTree(true);}\n" ) + "@after<sp>{System.out.println($r.ctx.toStringTree(this));}\n" ) + "<sp>:r=a<sp>;\n" ) + "a<sp>:<sp>\'x\'<sp>|<sp>\'y\'\n" ) + "<sp>;\n" ) ; java . lang . String result = execParser ( "T.g4" ... | org . junit . Assert . assertEquals ( expecting , result ) |
testAlreadyReadableMap ( ) { final org . apache . commons . collections4 . map . HashedMap < java . lang . String , java . lang . Integer > hashedMap = new org . apache . commons . collections4 . map . HashedMap ( ) ; "<AssertPlaceHolder>" ; } readableMap ( org . apache . commons . collections4 . Get ) { if ( get == nu... | org . junit . Assert . assertSame ( hashedMap , org . apache . commons . collections4 . SplitMapUtils . readableMap ( hashedMap ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.