input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
leftDisjunctTest ( ) { ann . setInput ( 0 , 1 ) ; ann . calculate ( ) ; print ( "0,<sp>1" , ann . getOutput ( ) [ 0 ] , 1.0 ) ; "<AssertPlaceHolder>" ; } print ( java . lang . String , double , double ) { System . out . println ( ( ( ( ( ( "Testing:<sp>" + input ) + "<sp>Expected:<sp>" ) + actual ) + "<sp>Result:<sp>" ... | org . junit . Assert . assertEquals ( ann . getOutput ( ) [ 0 ] , 1.0 , 0.0 ) |
testTokenWriter ( ) { org . apache . uima . analysis_engine . AnalysisEngine engine = org . apache . uima . fit . factory . AnalysisEngineFactory . createEngine ( org . cleartk . util . ae . linewriter . LineWriter . class , LineWriter . PARAM_OUTPUT_DIRECTORY_NAME , this . outputDirectory . getPath ( ) , LineWriter . ... | org . junit . Assert . assertEquals ( expected , actual ) |
watchmanSyncIsIssuedForTheFirstInvocation ( ) { com . facebook . buck . skylark . io . impl . WatchmanGlobberTest . CapturingWatchmanClient watchmanClient = new com . facebook . buck . skylark . io . impl . WatchmanGlobberTest . CapturingWatchmanClient ( ) ; globber = com . facebook . buck . skylark . io . impl . Watch... | org . junit . Assert . assertTrue ( watchmanClient . syncRequested ( ) ) |
shouldProduceARandomGUIDOfTheRequestedLength ( ) { com . wesabe . api . util . guid . GUID guid = com . wesabe . api . util . guid . GUID . generateRandom ( 40 ) ; "<AssertPlaceHolder>" ; } length ( ) { return characters . length ; } | org . junit . Assert . assertEquals ( 40 , guid . length ( ) ) |
peerDiscoveryPolling ( ) { final org . bitcoinj . core . CountDownLatch latch = new org . bitcoinj . core . CountDownLatch ( 1 ) ; final org . bitcoinj . core . AtomicBoolean result = new org . bitcoinj . core . AtomicBoolean ( ) ; peerGroup . addPeerDiscovery ( new org . bitcoinj . core . PeerDiscovery ( ) { @ org . b... | org . junit . Assert . assertTrue ( result . get ( ) ) |
testCollectWithEmpties ( ) { byte [ ] a = new byte [ ] { } ; byte [ ] b = new byte [ ] { } ; byte [ ] result = io . reactivex . Flowable . just ( a , b ) . to ( com . github . davidmoten . rx2 . Bytes . collect ( ) ) . blockingGet ( ) ; "<AssertPlaceHolder>" ; } collect ( ) { return new io . reactivex . functions . Fun... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( new byte [ ] { } , result ) ) |
testGetBackground_onVirtual_resolvesItem ( ) { grid = new org . eclipse . nebula . widgets . grid . Grid ( shell , org . eclipse . swt . SWT . VIRTUAL ) ; grid . setItemCount ( 1 ) ; org . eclipse . nebula . widgets . grid . GridItem item = grid . getItem ( 0 ) ; item . getBackground ( ) ; "<AssertPlaceHolder>" ; } isR... | org . junit . Assert . assertTrue ( item . isResolved ( ) ) |
readMissingContinuationBytesThrowsEofException ( ) { okio . Buffer buffer = new okio . Buffer ( ) ; buffer . writeByte ( 223 ) ; try { buffer . readUtf8CodePoint ( ) ; org . junit . Assert . fail ( ) ; } catch ( java . io . EOFException expected ) { } "<AssertPlaceHolder>" ; } exhausted ( ) { if ( closed ) throw new ja... | org . junit . Assert . assertFalse ( buffer . exhausted ( ) ) |
doesNotHaveNextIfLastIterated ( ) { iterator . next ( ) ; iterator . next ( ) ; iterator . next ( ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return iterator . hasNext ( ) ; } | org . junit . Assert . assertFalse ( iterator . hasNext ( ) ) |
testList ( ) { underTest . start ( ) ; createRoutingRule ( "asdf1" , "asdf1" ) ; createRoutingRule ( "asdf2" , "asdf2" ) ; createRoutingRule ( "asdf3" , "asdf3" ) ; java . util . List < org . sonatype . nexus . repository . routing . RoutingRule > matchers = underTest . list ( ) ; "<AssertPlaceHolder>" ; } size ( ) { r... | org . junit . Assert . assertThat ( matchers . size ( ) , org . hamcrest . Matchers . is ( 3 ) ) |
validFeatureTagIsConsideredInIncludeTags ( ) { java . lang . String featureContent = getTwoScenariosWithTags ( ) ; when ( propertyManager . getIncludeScenarioTags ( ) ) . thenReturn ( "@featureTag" ) ; java . util . List < com . trivago . vo . SingleScenario > singleScenariosFromFeature = gherkinDocumentParser . getSin... | org . junit . Assert . assertThat ( singleScenariosFromFeature . size ( ) , org . hamcrest . core . Is . is ( 2 ) ) |
testCleanOldCacheNoEntriesRemaining ( ) { long cacheExpirationMs = TimeUnit . DAYS . toMillis ( 5 ) ; com . facebook . cache . common . CacheKey key1 = new com . facebook . cache . common . SimpleCacheKey ( "aaa" ) ; byte [ ] value1 = new byte [ 41 ] ; mCache . insert ( key1 , com . facebook . cache . common . WriterCa... | org . junit . Assert . assertEquals ( 0L , oldestEntry ) |
shouldRejectNullType ( ) { nwTest = org . openstack . atlas . api . validation . validators . NetworkItemValidatorTest . initNetworkItem ( "69.172.35.111" , null , null ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = nwValidator . validate ( nwTest , org . openstack . atlas . api . v... | org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . validation . validators . FULL ) , result . passedValidation ( ) ) |
getTemplateContext ( ) { "<AssertPlaceHolder>" ; } getTemplateContext ( ) { return context ; } | org . junit . Assert . assertSame ( context , adapter . getTemplateContext ( ) ) |
testDTInFlattenableInnerJoinFormat ( ) { setProjectionPruningProperty ( projectionPruningDisabled ) ; java . lang . String sqlText = "with<sp>temp1<sp>as<sp>(select<sp>*<sp>from<sp>(select<sp>*<sp>from<sp>t1)<sp>TX<sp>INNER<sp>JOIN<sp>t4<sp>on<sp>b1=b4)\n" + "select<sp>count(1)<sp>from<sp>temp1" ; java . lang . String ... | org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toString ( rs ) ) |
pagination2 ( ) { net . jforum . entities . util . Pagination p = this . newPagination ( 5 , 19 , 0 ) ; "<AssertPlaceHolder>" ; } getTotalPages ( ) { return totalPages ; } | org . junit . Assert . assertEquals ( 4 , p . getTotalPages ( ) ) |
testAddMatrix ( ) { org . nd4j . linalg . api . ndarray . INDArray five = org . nd4j . linalg . factory . Nd4j . ones ( 5 ) ; five . addi ( five ) ; org . nd4j . linalg . api . ndarray . INDArray twos = org . nd4j . linalg . factory . Nd4j . valueArrayOf ( 5 , 2 ) ; "<AssertPlaceHolder>" ; } valueArrayOf ( int [ ] , do... | org . junit . Assert . assertEquals ( twos , five ) |
testSubsystemLocationInvalid ( ) { java . lang . String locationString = "subsystem://?Subsystem-SymbolicName=org.osgi.service.subsystem.root&Subsystem-Version=1.0.0!/my-subsystem@0.5.0" ; org . apache . aries . subsystem . core . internal . Location location = new org . apache . aries . subsystem . core . internal . L... | org . junit . Assert . assertEquals ( locationString , location . getValue ( ) ) |
simpleTake ( ) { org . ebayopensource . turmeric . runtime . spf . impl . transport . local . LocalTransportPoller completionQueue = new org . ebayopensource . turmeric . runtime . spf . impl . transport . local . LocalTransportPoller ( ) ; org . ebayopensource . turmeric . runtime . tests . spf . local . LocalTranspor... | org . junit . Assert . assertTrue ( ( future == ( aSleeper . getFuture ( ) ) ) ) |
createRest ( ) { wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareGradle ( project . getName ( ) , com . liferay . ide . ui . module . tests . REST ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningJobs ( ) ; "<AssertPlaceHolder>" ; viewAction . project . closeAndDelete ( proj... | org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( project . getName ( ) ) ) |
merge_with_templateExpression_in_batch ( ) { com . querydsl . sql . dml . SQLMergeClause merge = merge ( com . querydsl . sql . Constants . survey ) . keys ( survey . id ) . set ( survey . id , 5 ) . set ( survey . name , com . querydsl . core . types . dsl . Expressions . stringTemplate ( "'5'" ) ) . addBatch ( ) ; "<... | org . junit . Assert . assertEquals ( 1 , merge . execute ( ) ) |
testWritable ( ) { int splitNum = 88 ; byte [ ] planBytes = "0123456789987654321" . getBytes ( ) ; byte [ ] fragmentBytes = "abcdefghijklmnopqrstuvwxyz" . getBytes ( ) ; org . apache . hadoop . mapred . SplitLocationInfo [ ] locations = new org . apache . hadoop . mapred . SplitLocationInfo [ ] { new org . apache . had... | org . junit . Assert . assertEquals ( 0 , byteInStream . available ( ) ) |
testUserCumulate ( ) { java . util . Calendar ca = java . util . Calendar . getInstance ( ) ; ca . add ( Calendar . DAY_OF_MONTH , ( - 7 ) ) ; java . util . List < ? > userSummaryList = dataApi . datacube ( DatacubeType . GETUSERCUMULATE , ca . getTime ( ) , 3 ) ; "<AssertPlaceHolder>" ; System . err . println ( userSu... | org . junit . Assert . assertFalse ( userSummaryList . isEmpty ( ) ) |
retrieveImageID ( ) { final org . apache . commons . codec . binary . Hex hex = new org . apache . commons . codec . binary . Hex ( ) ; final byte [ ] hash = hex . decode ( "8a9111fe05f9815fc55c728137c5b389" . getBytes ( ) ) ; final byte [ ] key = makeFsEntryKey ( hash , "/howdy/doody.jpg" . getBytes ( ) , 34 ) ; "<Ass... | org . junit . Assert . assertArrayEquals ( hash , getImageID ( key ) ) |
test ( ) { com . jfireframework . sql . test . entity . User4 user4 = new com . jfireframework . sql . test . entity . User4 ( ) ; session . save ( user4 ) ; testUnit . clearSchemaData ( ) ; testUnit . importExcelFile ( "test1.xlsx" ) ; user4 = session . get ( com . jfireframework . sql . test . entity . User4 . class ... | org . junit . Assert . assertNull ( user4 . getDate ( ) ) |
testQueryableFilter ( ) { final java . lang . String [ ] expected = new java . lang . String [ ] { "-cc" , "-ee" } ; final java . util . List < java . lang . String > actual = me . josephzhu . java8inaction . test . queryable . Queryable . of ( data ) . filter ( ( w ) -> w . startsWith ( "-" ) ) . toList ( ) ; "<Assert... | org . junit . Assert . assertArrayEquals ( expected , actual . toArray ( ) ) |
shouldUpdateTokenWhenItExists ( ) { template . save ( new org . ei . drishti . reporting . domain . Token ( "aggregate-reports-token" , ( ( java . lang . Integer ) ( 1 ) ) . toString ( ) ) ) ; repository . saveAggregateReportsToken ( 2 ) ; "<AssertPlaceHolder>" ; } getAggregateReportsToken ( ) { org . ei . drishti . re... | org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 2 ) ) , repository . getAggregateReportsToken ( ) ) |
testIsErrorPutTrue ( ) { target . statusCode = target . NO_CONTENT ; "<AssertPlaceHolder>" ; } isError ( java . lang . String ) { if ( ( method . equals ( "GET" ) ) || ( method . equals ( "DELETE" ) ) ) { if ( ! ( statusCode . equals ( org . o3project . odenos . remoteobject . message . Response . OK ) ) ) { return tru... | org . junit . Assert . assertThat ( target . isError ( "PUT" ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testKindMetNationaliteitEnMetIndicatieStaatsloos ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteiten = bral0219 . voerRegelUit ( maakFamilie ( SoortIndicatie . INDICATIE_STAATLOOS , nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . staatloo... | org . junit . Assert . assertEquals ( 0 , berichtEntiteiten . size ( ) ) |
parseCreateTable ( ) { java . lang . String code = org . apache . commons . io . IOUtils . toString ( this . getClass ( ) . getResourceAsStream ( "CreateTable.pls" ) , StandardCharsets . UTF_8 ) ; net . sourceforge . pmd . lang . plsql . ast . ASTInput input = parsePLSQL ( code ) ; "<AssertPlaceHolder>" ; } parsePLSQL ... | org . junit . Assert . assertNotNull ( input ) |
hoverTest ( ) { iface . go ( testPage ) ; com . sugarcrm . candybean . automation . webdriver . WebDriverElement hoverElement = $ ( "#hoverableDiv<sp>#hoverElement" ) ; hoverElement . hover ( ) ; "<AssertPlaceHolder>" ; } isDisplayed ( ) { logger . info ( ( "Determining<sp>if<sp>element<sp>is<sp>visible:<sp>" + ( this ... | org . junit . Assert . assertFalse ( hoverElement . isDisplayed ( ) ) |
validate_shouldFailIfTheNameIsAWhiteSpaceCharacter ( ) { org . openmrs . ConceptMapType mapType = new org . openmrs . ConceptMapType ( ) ; mapType . setName ( "<sp>" ) ; org . springframework . validation . Errors errors = new org . springframework . validation . BindException ( mapType , "mapType" ) ; new org . openmr... | org . junit . Assert . assertEquals ( true , errors . hasFieldErrors ( "name" ) ) |
testAndShortCircuitGivesFalse ( ) { com . picocontainer . gems . constraints . Constraint c = new com . picocontainer . gems . constraints . And ( c1 , c2 , c3 ) ; final org . jmock . Sequence sequence = mockery . sequence ( "contraints" ) ; mockery . checking ( new org . jmock . Expectations ( ) { { one ( c1 ) . evalu... | org . junit . Assert . assertFalse ( c . evaluate ( adapter ) ) |
testSetReadOnly ( ) { org . apache . qpid . jms . message . JmsMessage msg = factory . createMessage ( ) ; msg . setReadOnlyProperties ( true ) ; boolean test = false ; try { msg . setIntProperty ( "test" , 1 ) ; } catch ( javax . jms . MessageNotWriteableException me ) { test = true ; } catch ( javax . jms . JMSExcept... | org . junit . Assert . assertTrue ( test ) |
cantGetSiteType ( ) { reset ( siteService ) ; when ( siteService . getSite ( org . sakaiproject . mailsender . logic . impl . ExternalLogicImplTest . LOCATION_ID ) ) . thenThrow ( new org . sakaiproject . exception . IdUnusedException ( org . sakaiproject . mailsender . logic . impl . ExternalLogicImplTest . LOCATION_I... | org . junit . Assert . assertNull ( type ) |
testConverteerBijhoudingOpgeschortRNI ( ) { final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Stapel < nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3InschrijvingInhoud > lo3InschrijvingStapel = buildInschrijving ( Lo3RedenOpschortingBijhoudingCodeEnum . OVERLIJDEN , new nl . bzk . migratie... | org . junit . Assert . assertEquals ( 2 , migratieBijhoudingStapel . size ( ) ) |
testDetectTypeFromExtensionUnknown ( ) { java . lang . String testFileName = "/a/path/to/core.wtf" ; org . irods . jargon . core . rule . RuleTypeEvaluator detector = new org . irods . jargon . core . rule . RuleTypeEvaluator ( ) ; org . irods . jargon . core . rule . IrodsRuleInvocationTypeEnum actual = detector . det... | org . junit . Assert . assertNull ( actual ) |
testJacksonSerialization ( ) { org . batfish . datamodel . MacAddress macAddress = org . batfish . datamodel . MacAddress . of ( 5L ) ; "<AssertPlaceHolder>" ; } clone ( java . lang . Object , java . lang . Class ) { return org . batfish . common . util . BatfishObjectMapper . MAPPER . readValue ( org . batfish . commo... | org . junit . Assert . assertThat ( org . batfish . common . util . BatfishObjectMapper . clone ( macAddress , org . batfish . datamodel . MacAddress . class ) , org . hamcrest . Matchers . equalTo ( macAddress ) ) |
testSerialization ( ) { org . jfree . data . time . TimeTableXYDataset d1 = new org . jfree . data . time . TimeTableXYDataset ( ) ; d1 . add ( new org . jfree . data . time . Year ( 1999 ) , 123.4 , "S1" ) ; org . jfree . data . time . TimeTableXYDataset d2 = ( ( org . jfree . data . time . TimeTableXYDataset ) ( org ... | org . junit . Assert . assertTrue ( d1 . equals ( d2 ) ) |
testTempFailureInAllocateCallback ( ) { org . apache . asterix . app . bootstrap . TestNodeController . PrimaryIndexInfo primaryIndexInfo = org . apache . asterix . test . dataflow . StorageTestUtils . createPrimaryIndex ( org . apache . asterix . test . dataflow . IoCallbackFailureTest . nc , org . apache . asterix . ... | org . junit . Assert . assertTrue ( expectedExceptionThrown ) |
testOverviewLayout ( ) { this . setTestName ( ( ( getClassname ( ) ) + "-testOvervieLayout" ) ) ; this . getDriver ( ) ; this . getAppController ( ) . openViewer ( this . getDriver ( ) , getTestDerivate ( ) ) ; org . mycore . iview . tests . controller . ImageViewerController controller = this . getViewerController ( )... | org . junit . Assert . assertEquals ( ( 2 * before ) , after ) |
restoreHostNameToURL_referrerURLWithoutHostWithPort ( ) { java . lang . String referrerURL = "https://:9043/otherpage" ; java . lang . String url = "http://myhost.com/mypage" ; java . lang . String expected = "https://myhost.com:9043/otherpage" ; "<AssertPlaceHolder>" ; } restoreHostNameToURL ( java . lang . String , j... | org . junit . Assert . assertEquals ( expected , handler . restoreHostNameToURL ( referrerURL , url ) ) |
testFindByName ( ) { java . lang . String fieldName1 = "alpha" ; java . lang . String fieldName2 = "bravo" ; java . lang . String fieldName3 = "charlie" ; org . oscarehr . PMmodule . model . CriteriaType cT1 = new org . oscarehr . PMmodule . model . CriteriaType ( ) ; org . oscarehr . common . dao . utils . EntityDataG... | org . junit . Assert . assertEquals ( expectedResult , result ) |
adsDetailsPage_withClickOnMoPubMrectSample_shouldNotLoadMoPubMrect ( ) { final java . lang . String fakeAdUnit = "abc" ; final java . lang . String adUnitTitle = "MRECT<sp>Automation<sp>Test" ; final com . mopub . framework . pages . AdListPage adListPage = new com . mopub . framework . pages . AdListPage ( ) ; adListP... | org . junit . Assert . assertTrue ( ( ! ( adDetailPage . waitForElement ( bannerElement ) ) ) ) |
testDateFormatMinutes ( ) { java . lang . String test = "%s" ; java . lang . String escapedString = org . apache . flume . formatter . output . BucketPath . escapeString ( test , headers , true , Calendar . MINUTE , 5 ) ; System . out . println ( ( "Escaped<sp>String:<sp>" + escapedString ) ) ; java . util . Calendar c... | org . junit . Assert . assertEquals ( expectedString , escapedString ) |
testNotMissingMissingReference ( ) { com . liferay . portal . kernel . xml . Element bookmarksEntryElement = _portletDataContext . getExportDataElement ( _bookmarksEntry ) ; _portletDataContext . addReferenceElement ( _bookmarksEntry , bookmarksEntryElement , _bookmarksFolder , PortletDataContext . REFERENCE_TYPE_PAREN... | org . junit . Assert . assertEquals ( missingReferenceElements . toString ( ) , 0 , missingReferenceElements . size ( ) ) |
testLearningObj ( ) { org . slc . sli . domain . Entity obj = helper . generateLearningObjective ( ) ; "<AssertPlaceHolder>" ; } canAccess ( org . slc . sli . domain . Entity ) { return canAccess ( entity , true ) ; } | org . junit . Assert . assertTrue ( validator . canAccess ( obj ) ) |
testProcess_invalidHost ( ) { net . roboconf . agent . monitoring . internal . nagios . NagiosHandler handler = new net . roboconf . agent . monitoring . internal . nagios . NagiosHandler ( ) ; handler . setAgentId ( net . roboconf . agent . monitoring . internal . nagios . NagiosHandlerTest . APP_NAME , net . roboconf... | org . junit . Assert . assertNull ( handler . process ( ) ) |
testReducer1 ( ) { java . util . List < org . apache . hadoop . io . DoubleWritable > values = new java . util . ArrayList < org . apache . hadoop . io . DoubleWritable > ( ) ; values . add ( new org . apache . hadoop . io . DoubleWritable ( 690.23 ) ) ; values . add ( new org . apache . hadoop . io . DoubleWritable ( ... | org . junit . Assert . assertTrue ( true ) |
testCBuildFileUnspecifiedXLS ( ) { net . casper . data . model . CBuilder builder = new net . casper . io . file . in . CBuildFromFile ( patientsXLS , "refnum,crefnum" ) ; net . casper . data . model . CDataCacheContainer cdcc = new net . casper . data . model . CDataCacheContainer ( builder ) ; cdcc . getAll ( ) ; "<A... | org . junit . Assert . assertEquals ( 4 , cdcc . size ( ) ) |
testCancelOnError ( ) { org . databene . contiperf . junit . ContiPerfRuleTest . TestBean test = new org . databene . contiperf . junit . ContiPerfRuleTest . TestBean ( ) ; try { check ( test , "cancelOnError" ) ; } catch ( java . lang . RuntimeException e ) { int count = test . cancelOnErrorCount . get ( ) ; "<AssertP... | org . junit . Assert . assertEquals ( 1 , count ) |
testGetSafeCallsGetValid ( ) { when ( uit . getValid ( org . owasp . esapi . reference . validation . BaseValidationRuleTest . STR_VAL , org . owasp . esapi . reference . validation . BaseValidationRuleTest . STR_VAL ) ) . thenReturn ( this ) ; java . lang . Object vRef = uit . getSafe ( org . owasp . esapi . reference... | org . junit . Assert . assertEquals ( this , vRef ) |
testRequestWithoutAuthorization ( ) { javax . servlet . http . HttpServletRequest request = org . mockito . Mockito . mock ( javax . servlet . http . HttpServletRequest . class ) ; javax . servlet . http . HttpServletResponse response = org . mockito . Mockito . mock ( javax . servlet . http . HttpServletResponse . cla... | org . junit . Assert . assertNull ( handler . authenticate ( request , response ) ) |
test_no_topic_permissions_on_empty_groups_for_account ( ) { java . util . List < com . stormpath . sdk . group . Group > emptyGroupList = new java . util . LinkedList < com . stormpath . sdk . group . Group > ( ) ; com . dcsquare . hivemq . plugin . stormpathplugin . callbacks . AuthorizationTest . MockIterator mockIte... | org . junit . Assert . assertTrue ( permissions . isEmpty ( ) ) |
testDomainDimensionSanity ( ) { opennlp . tools . ml . model . RealValueFileEventStream rvfes1 = new opennlp . tools . ml . model . RealValueFileEventStream ( "src/test/resources/data/opennlp/maxent/real-valued-weights-training-data.txt" , "UTF-8" ) ; testDataIndexer . index ( rvfes1 ) ; opennlp . tools . ml . maxent .... | org . junit . Assert . assertEquals ( correctDomainDimension , objectFunction . getDimension ( ) ) |
shouldFilterOutEntityNotInView ( ) { final uk . gov . gchq . gaffer . hbasestore . coprocessor . processor . GroupFilterProcessor processor = new uk . gov . gchq . gaffer . hbasestore . coprocessor . processor . GroupFilterProcessor ( uk . gov . gchq . gaffer . hbasestore . coprocessor . processor . GroupFilterProcesso... | org . junit . Assert . assertFalse ( result ) |
metadata_xmlAssociationEndTypefalse ( ) { final java . lang . String entryName = "bar/90_contents/odatacol1/00_$metadata.xml" ; final java . lang . String filename = "/00_$metadata_associaton_type_attr_notexist.xml" ; java . net . URL fileUrl = java . lang . ClassLoader . getSystemResource ( ( ( com . fujitsu . dc . te... | org . junit . Assert . assertFalse ( res ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . social . kernel . model . SocialActivityCounter missingSocialActivityCounter = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { ret... | org . junit . Assert . assertNull ( missingSocialActivityCounter ) |
testGetIsDirtySupplierWhenItIsNotDirty ( ) { doReturn ( false ) . when ( presenter ) . isGuidedDecisionTablesDirty ( ) ; doReturn ( false ) . when ( presenter ) . isGraphDirty ( ) ; doReturn ( false ) . when ( presenter ) . isOverviewWidgetDirty ( ) ; final java . util . function . Supplier < java . lang . Boolean > is... | org . junit . Assert . assertFalse ( isDirtySupplier . get ( ) ) |
tokenIsValidTest ( ) { com . clouway . oauth2 . jws . Pem . Block block = pem . parse ( com . clouway . oauth2 . jws . ReadPemFilesTest . class . getResourceAsStream ( "sub" 0 ) ) ; com . clouway . oauth2 . Identity identity = new com . clouway . oauth2 . Identity ( "123" , "Pojo" , "isAdmin" 7 , "sub" 2 , "isAdmin" 8 ... | org . junit . Assert . assertTrue ( tokenIsValid ) |
whenAddCalledValueCaptured ( ) { org . baeldung . mockito . MyList mockVoid = mock ( org . baeldung . mockito . MyList . class ) ; org . mockito . ArgumentCaptor < java . lang . String > valueCapture = org . mockito . ArgumentCaptor . forClass ( java . lang . String . class ) ; doNothing ( ) . when ( mockVoid ) . add (... | org . junit . Assert . assertEquals ( "captured" , valueCapture . getValue ( ) ) |
testGetRowCountNonScrolableNullResultSet ( ) { org . pentaho . platform . plugin . services . connections . sql . SQLResultSet resultSet = new org . pentaho . platform . plugin . services . connections . sql . SQLResultSet ( null , nativeConnection ) ; "<AssertPlaceHolder>" ; } getRowCount ( ) { if ( ! ( isScrollable (... | org . junit . Assert . assertEquals ( ( - 1 ) , resultSet . getRowCount ( ) ) |
testIsSnapshotOnly ( ) { "<AssertPlaceHolder>" ; } isSnapshotOnly ( ) { return snapshotOnly ; } | org . junit . Assert . assertTrue ( transaction . isSnapshotOnly ( ) ) |
test ( ) { org . geotools . ows . MockHttpClient client = new org . geotools . ows . MockHttpClient ( ) { public org . geotools . data . ows . HTTPResponse get ( java . net . URL url ) throws java . io . IOException { if ( url . getQuery ( ) . contains ( "GetCapabilities" ) ) { java . net . URL caps = org . geotools . ... | org . junit . Assert . assertFalse ( request . getFinalURL ( ) . toString ( ) . contains ( "<sp>" ) ) |
testProperties ( ) { final org . csstudio . apputil . test . TestProperties settings = new org . csstudio . apputil . test . TestProperties ( ) ; "<AssertPlaceHolder>" ; final java . lang . String text = settings . getString ( org . csstudio . apputil . test . TestPropertiesUnitTest . TEST_SETTINGS ) ; if ( text == nul... | org . junit . Assert . assertNotNull ( settings ) |
testAddEntryWithURLTitle ( ) { java . lang . String urlTitle = com . liferay . portal . kernel . util . StringUtil . toLowerCase ( com . liferay . portal . kernel . util . StringUtil . randomString ( ) ) ; com . liferay . blogs . model . BlogsEntry entry = com . liferay . blogs . service . BlogsEntryLocalServiceUtil . ... | org . junit . Assert . assertEquals ( urlTitle , entry . getUrlTitle ( ) ) |
testGetAll ( ) { jp . primecloud . auto . zabbix . model . usergroup . UsergroupGetParam param = new jp . primecloud . auto . zabbix . model . usergroup . UsergroupGetParam ( ) ; param . setOutput ( "extend" ) ; java . util . List < jp . primecloud . auto . zabbix . model . usergroup . Usergroup > usergroups = client .... | org . junit . Assert . assertTrue ( ( ( usergroups . size ( ) ) > 0 ) ) |
testCommandIsExecutedCorrectly ( ) { java . lang . String [ ] args = new java . lang . String [ ] { "help" } ; com . espirit . moddev . cli . api . command . Command < com . espirit . moddev . cli . api . result . Result > command = com . espirit . moddev . cli . Cli . parseCommandLine ( args ) ; com . espirit . moddev... | org . junit . Assert . assertFalse ( result . isError ( ) ) |
testGetUserTimelinePagination ( ) { mockServer . expect ( requestTo ( "https://api.weibo.com/2/statuses/user_timeline.json?uid=1&since_id=0&max_id=0&count=10&page=5&base_app=0&feature=0" ) ) . andExpect ( method ( org . springframework . social . weibo . api . impl . GET ) ) . andExpect ( header ( "Authorization" , "OA... | org . junit . Assert . assertEquals ( "" , firstStatus . getText ( ) ) |
test_withOffsetSameInstant_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 . withOffs... | org . junit . Assert . assertSame ( test , base ) |
getNoSuchCatalog ( ) { org . apache . hadoop . hive . metastore . api . PrimaryKeysRequest rqst = new org . apache . hadoop . hive . metastore . api . PrimaryKeysRequest ( testTables [ 0 ] . getTableName ( ) , testTables [ 0 ] . getTableName ( ) ) ; rqst . setCatName ( "nosuch" ) ; java . util . List < org . apache . h... | org . junit . Assert . assertTrue ( pk . isEmpty ( ) ) |
testIsSecured ( ) { "<AssertPlaceHolder>" ; } isSecured ( org . onosproject . core . ApplicationId ) { org . onosproject . security . store . SecurityInfo info = states . get ( appId ) ; return info == null ? false : info . getState ( ) . equals ( org . onosproject . security . store . SecurityModeState . SECURED ) ; } | org . junit . Assert . assertTrue ( store . isSecured ( appId ) ) |
test2MFZ ( ) { org . biojava . nbio . structure . align . util . AtomCache cache = new org . biojava . nbio . structure . align . util . AtomCache ( ) ; org . biojava . nbio . structure . StructureIO . setAtomCache ( cache ) ; cache . setUseMmCif ( true ) ; org . biojava . nbio . structure . Structure s1 = org . biojav... | org . junit . Assert . assertEquals ( 1 , interfaces . size ( ) ) |
testCollect ( ) { org . eclipse . rdf4j . sail . Sail ms = new org . eclipse . rdf4j . sail . memory . MemoryStore ( ) ; org . eclipse . rdf4j . repository . sail . SailRepository repo = new org . eclipse . rdf4j . repository . sail . SailRepository ( ms ) ; repo . initialize ( ) ; org . apache . rya . rdftriplestore .... | org . junit . Assert . assertTrue ( result . hasNext ( ) ) |
testGetByteFromByte ( ) { byte value = org . apache . activemq . artemis . utils . RandomUtil . randomByte ( ) ; org . apache . activemq . artemis . jms . client . ActiveMQMapMessage message = new org . apache . activemq . artemis . jms . client . ActiveMQMapMessage ( ) ; message . setByte ( itemName , value ) ; "<Asse... | org . junit . Assert . assertEquals ( value , message . getByte ( itemName ) ) |
shouldReturnTestUnitWhenMatchingTestDetailSupplied ( ) { final java . util . List < org . pitest . testapi . TestUnit > actual = this . testee . translateTests ( java . util . Arrays . asList ( new org . pitest . coverage . TestInfo ( "foo" , "one" , 42 , java . util . Optional . < org . pitest . classinfo . ClassName ... | org . junit . Assert . assertEquals ( 1 , actual . size ( ) ) |
test2ReplaceMiddleIndex ( ) { 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 . ant... | org . junit . Assert . assertEquals ( expecting , result ) |
shouldCallGetAutoCommit ( ) { "<AssertPlaceHolder>" ; } getAutoCommit ( ) { notClosed ( ) ; return autoCommit ; } | org . junit . Assert . assertThat ( conn . getAutoCommit ( ) , org . hamcrest . core . Is . is ( true ) ) |
testSquareOfTen ( ) { "<AssertPlaceHolder>" ; } sqrt ( double ) { double low = 0 ; double high = num ; double mid = 0 ; while ( low < high ) { mid = ( high + low ) / 2 ; double result = mid * mid ; if ( ( java . lang . Math . abs ( ( result - num ) ) ) < ( com . charlesbihis . sandbox . sqrtestimationbybinarysearch . S... | org . junit . Assert . assertTrue ( ( ( ( ( com . charlesbihis . sandbox . sqrtestimationbybinarysearch . SqrtEstimationByBinarySearch . sqrt ( 10 ) ) * ( com . charlesbihis . sandbox . sqrtestimationbybinarysearch . SqrtEstimationByBinarySearch . sqrt ( 10 ) ) ) - ( SqrtEstimationByBinarySearch . DELTA ) ) > 0 ) ) |
test_doRequest_withoutUser_withPass ( ) { org . talend . updates . runtime . engine . HttpClientTransportTest . HttpClientTransportTestClass transport = new org . talend . updates . runtime . engine . HttpClientTransportTest . HttpClientTransportTestClass ( "http://localhost:8081/nexus/content/repositories/components/"... | org . junit . Assert . assertNull ( credentials ) |
testConcatenation ( ) { final java . lang . String theTest = de . mirkosertic . bytecoder . core . StringTest . getString ( ) ; final java . lang . String theTest2 = theTest + "456" ; final int theLength = theTest2 . length ( ) ; "<AssertPlaceHolder>" ; } length ( ) { float theSquareSum = 0.0F ; theSquareSum += ( s0 ) ... | org . junit . Assert . assertEquals ( 6 , theTest2 . length ( ) , 0 ) |
getParameterTypes ( ) { final com . navercorp . pinpoint . profiler . instrument . ClassNode classNode = com . navercorp . pinpoint . profiler . instrument . ASMClassNodeLoader . get ( "com.navercorp.pinpoint.profiler.instrument.mock.ArgsClass" ) ; java . util . List < com . navercorp . pinpoint . profiler . instrument... | org . junit . Assert . assertEquals ( parameterTypes . length , argumentTypes . length ) |
testNestedOpArray ( ) { org . stringtemplate . v4 . ST e = new org . stringtemplate . v4 . ST ( "<first(rest(names))>" ) ; e . add ( "names" , new java . lang . String [ ] { "Ter" , "Tom" , "Sriram" } ) ; java . lang . String expecting = "Tom" ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Local... | org . junit . Assert . assertEquals ( expecting , e . render ( ) ) |
testRevocationReqToJsonNullID ( ) { try { org . hyperledger . fabric_ca . sdk . RevocationRequest testRevocationReq = new org . hyperledger . fabric_ca . sdk . RevocationRequest ( org . hyperledger . fabric_ca . sdk . RevocationRequestTest . revCAName , null , org . hyperledger . fabric_ca . sdk . RevocationRequestTest... | org . junit . Assert . assertTrue ( testRevocationReq . toJson ( ) . contains ( org . hyperledger . fabric_ca . sdk . RevocationRequestTest . revSerialNmbr ) ) |
testIntegerInjectDefault ( ) { final java . util . List < java . lang . Integer > actual = Tang . Factory . getTang ( ) . newInjector ( ) . getInstance ( org . apache . reef . tang . IntegerClass . class ) . getIntegerList ( ) ; final java . util . List < java . lang . Integer > expected = new java . util . ArrayList (... | org . junit . Assert . assertEquals ( expected , actual ) |
testAll ( ) { java . lang . Object result = tokenTypeService . all ( ) ; "<AssertPlaceHolder>" ; } all ( ) { return dao . all ( ) ; } | org . junit . Assert . assertEquals ( new java . lang . Object ( ) , result ) |
testQuietLongArg ( ) { at . favre . tools . uberadb . ui . Arg parsedArg = at . favre . tools . uberadb . ui . CLIParser . parse ( at . favre . tools . uberadb . ui . CLIParserTest . asArgArray ( ( ( "-" + ( CLIParser . ARG_UNINSTALL ) ) + "<sp>com.android.*<sp>--quiet" ) ) ) ; at . favre . tools . uberadb . ui . Arg e... | org . junit . Assert . assertEquals ( expectedArg , parsedArg ) |
testDecanoniseBasicWithoutANF ( ) { org . apromore . canoniser . bpmn . bpmn . BpmnDefinitions definitions = testDecanonise ( "Basic-without-anf" ) ; "<AssertPlaceHolder>" ; } getBPMNDiagram ( ) { return bpmnDiagram ; } | org . junit . Assert . assertEquals ( 0 , definitions . getBPMNDiagram ( ) . size ( ) ) |
mustHaveLogFilesToPruneIfStrategyFindsFiles ( ) { when ( factory . strategyFromConfigValue ( eq ( fs ) , eq ( logFiles ) , eq ( clock ) , anyString ( ) ) ) . thenReturn ( ( upTo ) -> java . util . stream . LongStream . range ( 3 , upTo ) ) ; when ( logFiles . getHighestLogVersion ( ) ) . thenReturn ( 4L ) ; org . neo4j... | org . junit . Assert . assertTrue ( pruning . mightHaveLogsToPrune ( ) ) |
shouldReturnSetForSupertype ( ) { java . util . Set < java . lang . Integer > set = new java . util . HashSet ( java . util . Arrays . asList ( 123 , 456 , 789 , 12 , 3 , 45 , 66 , 78 ) ) ; java . lang . Class < ? > rawType = java . util . Collection . class ; java . lang . Object result = ch . jalu . injector . utils ... | org . junit . Assert . assertThat ( ( result == set ) , org . hamcrest . Matchers . equalTo ( true ) ) |
testSerializeApplicationVersionWithLiveMarshallers ( ) { underTest . setArchive ( false ) ; underTest . setMarshallerMap ( liveMarshallerMap ) ; org . dataconservancy . packaging . tool . ser . ApplicationVersionConverter applicationVersionConverter = spy ( new org . dataconservancy . packaging . tool . ser . Applicati... | org . junit . Assert . assertTrue ( ( ( result . size ( ) ) > 1 ) ) |
testWriting ( ) { final int MAX = 1000000 ; org . zoodb . internal . server . IOResourceProvider paf = createPageAccessFile ( ) ; org . zoodb . internal . server . index . LongLongIndex . LongLongUIndex ind = org . zoodb . internal . server . index . IndexFactory . createUniqueIndex ( PAGE_TYPE . GENERIC_INDEX , paf ) ... | org . junit . Assert . assertEquals ( MAX , n ) |
getId ( ) { com . zsmartsystems . zigbee . zcl . protocol . ZclCommandType cmd = ZclCommandType . ALARM_COMMAND ; "<AssertPlaceHolder>" ; } getId ( ) { return statusId ; } | org . junit . Assert . assertEquals ( 0 , cmd . getId ( ) ) |
testUnsuitableStoragePoliciesWithECStripedMode ( ) { final org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; int defaultStripedBlockSize = ( org . apache . hadoop . hdfs . server . namenode . TestStripedINodeFile . testECPolicy . getCellSize ( ) ) * 4 ; conf ... | org . junit . Assert . assertEquals ( StorageType . DISK , type ) |
ASIPMessage_CompareInToOutMessageRawInputStream_success ( ) { java . lang . String rawInput = "Hello<sp>ASIP." ; java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( rawInput . getBytes ( StandardCharsets . UTF_8 ) ) ; net . sharkfw . asip . engine . ASIPOutMessage outMessage = new net . sha... | org . junit . Assert . assertEquals ( rawInput , text ) |
testRefreshSuperUserGroupsConfiguration ( ) { org . apache . hadoop . yarn . server . api . protocolrecords . RefreshSuperUserGroupsConfigurationRequest request = recordFactory . newRecordInstance ( org . apache . hadoop . yarn . server . api . protocolrecords . RefreshSuperUserGroupsConfigurationRequest . class ) ; or... | org . junit . Assert . assertNotNull ( response ) |
testShouldReturnTheEntireWrittenContentIfSmallerThanTheBufferSize ( ) { java . lang . String expected = "foo" ; int maxSize = expected . getBytes ( ) . length ; org . openqa . selenium . remote . internal . CircularOutputStream os = new org . openqa . selenium . remote . internal . CircularOutputStream ( maxSize ) ; os... | org . junit . Assert . assertEquals ( expected , seen ) |
whenCallingStaticNewBuilderInstance_itShouldReturnNewBuilderInstance ( ) { com . graphhopper . jsprit . core . problem . vehicle . VehicleTypeImpl . Builder builder = VehicleTypeImpl . Builder . newInstance ( "foo" ) ; "<AssertPlaceHolder>" ; } newInstance ( java . lang . String ) { if ( id == null ) throw new java . l... | org . junit . Assert . assertNotNull ( builder ) |
testEndValue ( ) { final org . kie . workbench . common . dmn . api . editors . types . RangeValue range = new org . kie . workbench . common . dmn . api . editors . types . RangeValue ( ) ; final java . lang . String expected = "something" ; range . setEndValue ( "something" ) ; "<AssertPlaceHolder>" ; } getEndValue (... | org . junit . Assert . assertEquals ( expected , range . getEndValue ( ) ) |
testCompareLongGTDecimal2 ( ) { long ts = nextTimestamp ( ) ; com . salesforce . phoenix . end2end . CompareDecimalToLongTest . initTableValues ( null , ts ) ; java . lang . String query = "SELECT<sp>l<sp>FROM<sp>LongInKeyTest<sp>where<sp>l<sp>><sp>2.5" ; java . util . Properties props = new java . util . Properties ( ... | org . junit . Assert . assertFalse ( rs . next ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.