input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
getDefaultViewport ( ) { org . geotools . map . MapContent map = new org . geotools . map . MapContent ( ) ; map . addLayer ( new org . geotools . map . MapContentTest . MockLayer ( org . geotools . map . MapContentTest . WORLD_ENV ) ) ; org . geotools . map . MapViewport viewport = map . getViewport ( ) ; "<AssertPlac... | org . junit . Assert . assertNotNull ( viewport ) |
testBroadcastDiv ( ) { org . nd4j . linalg . api . ndarray . INDArray num = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1.0 , 1.0 , 1.0 , 1.0 , 2.0 , 2.0 , 2.0 , 2.0 , 1.0 , 1.0 , 1.0 , 1.0 , 2.0 , 2.0 , 2.0 , 2.0 , - 1.0 , - 1.0 , - 1.0 , - 1.0 , - 2.0 , - 2.0 , - 2.0 , - 2.0 , - 1.0 , - 1.0 , - 1... | org . junit . Assert . assertEquals ( expected , actual ) |
testRenameFile ( ) { try ( jcifs . smb . SmbFile defaultShareRoot = getDefaultShareRoot ( ) ; jcifs . SmbResource f = new jcifs . smb . SmbFile ( defaultShareRoot , makeRandomName ( ) ) ; jcifs . smb . SmbFile f2 = new jcifs . smb . SmbFile ( defaultShareRoot , makeRandomName ( ) ) ) { f . createNewFile ( ) ; boolean r... | org . junit . Assert . assertTrue ( f2 . exists ( ) ) |
testUUID ( ) { tested . setUUID ( "uuid1" ) ; "<AssertPlaceHolder>" ; verify ( view , times ( 1 ) ) . setUUID ( eq ( "uuid1" ) ) ; } getUUID ( ) { return uuid ; } | org . junit . Assert . assertEquals ( "uuid1" , tested . getUUID ( ) ) |
testCountDocumentToLarge ( ) { myConfig . setDefaultDurability ( Durability . NONE ) ; myConfig . setMaxConnectionCount ( 1 ) ; final com . allanbank . mongodb . bson . builder . DocumentBuilder builder = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) ; builder . add ( "_id" , 1 ) ; builder . a... | org . junit . Assert . assertEquals ( Client . MAX_DOCUMENT_SIZE , dtle . getMaximumSize ( ) ) |
testRemoveGroupedListenerRemovesListenerFromFacade ( ) { org . eclipse . swt . widgets . Listener listener = mock ( org . eclipse . swt . widgets . Listener . class ) ; decorator . addGroupedListener ( SWT . Selection , listener ) ; decorator . removeGroupedListener ( SWT . Selection , listener ) ; org . eclipse . swt ... | org . junit . Assert . assertEquals ( 0 , listeners . length ) |
testExecuteWithNoResults ( ) { java . util . List < java . lang . Long > peopleIds = sut . execute ( new org . eurekastreams . server . action . request . SharedResourceRequest ( "http://foo.foo.com/foo.html" , null ) ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( org .... | org . junit . Assert . assertEquals ( 0 , peopleIds . size ( ) ) |
testToString ( ) { fixture . setTag ( "" ) ; java . lang . String result = fixture . toString ( ) ; java . lang . String left = "[declaration]<sp>variant[" ; java . lang . String right = result . substring ( 0 , left . length ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return fName ; } | org . junit . Assert . assertEquals ( left , right ) |
testBuildWithParametersWithOrderBy ( ) { java . lang . String abbrName = "abbrName" ; java . lang . String name = "name" ; org . lnu . is . domain . enrolment . foreign . type . EnrolmentForeignType context = new org . lnu . is . domain . enrolment . foreign . type . EnrolmentForeignType ( ) ; context . setAbbrName ( a... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
checksumAdlerNullPathTest ( ) { java . lang . String nonExistingFile = "nonExistingFile" ; long checksum = org . pentaho . di . core . row . ValueDataUtil . ChecksumAdler32 ( new org . pentaho . di . core . row . value . ValueMetaString ( ) , nonExistingFile ) ; "<AssertPlaceHolder>" ; } ChecksumAdler32 ( org . pentaho... | org . junit . Assert . assertEquals ( 0 , checksum ) |
testMatchesEmptyTags ( ) { final com . allanbank . mongodb . bson . Document t = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . addInteger ( "a" , 1 ) . build ( ) ; final com . allanbank . mongodb . bson . Document [ ] tags = new com . allanbank . mongodb . bson . Document [ ] { } ; for ( fin... | org . junit . Assert . assertTrue ( prefs . matches ( t ) ) |
testDecodeUrl ( ) { java . lang . String vClassUri = "http://vivoweb.org/ontology/core#FacultyMember" ; java . lang . String vClassUriEncoded = "http%3A%2F%2Fvivoweb.org%2Fontology%2Fcore%23FacultyMember" ; "<AssertPlaceHolder>" ; } urlDecode ( java . lang . String ) { java . lang . String encoding = "UTF-8" ; java . l... | org . junit . Assert . assertEquals ( vClassUri , edu . cornell . mannlib . vitro . webapp . controller . freemarker . UrlBuilder . urlDecode ( vClassUriEncoded ) ) |
defaultSplitHandlesLargeLeafNodeAtRoot ( ) { java . lang . StringBuilder largeString = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < ( 50 * 1024 ) ; i ++ ) { largeString . append ( "x" ) ; } com . google . firebase . database . snapshot . Node leafNode = com . google . firebase . database . snapshot . Nod... | org . junit . Assert . assertEquals ( 2 , hash . getHashes ( ) . size ( ) ) |
testIterableDeletion ( ) { com . github . davidmoten . rtree3d . RTree < java . lang . Object , com . github . davidmoten . rtree3d . geometry . Box > tree = com . github . davidmoten . rtree3d . RTree . create ( ) ; com . github . davidmoten . rtree3d . Entry < java . lang . Object , com . github . davidmoten . rtree3... | org . junit . Assert . assertTrue ( ( ( ( entries . contains ( entry2 ) ) && ( ! ( entries . contains ( entry1 ) ) ) ) && ( ! ( entries . contains ( entry3 ) ) ) ) ) |
testSavesSettedCount ( ) { indicator . setCount ( 10 ) ; "<AssertPlaceHolder>" ; } getCount ( ) { return count ; } | org . junit . Assert . assertEquals ( 10 , indicator . getCount ( ) ) |
testAddGraphIdNoGraphIds ( ) { org . gradoop . common . model . impl . pojo . GraphElement graphElementMock = mock ( org . gradoop . common . model . impl . pojo . GraphElement . class , org . gradoop . common . model . impl . pojo . CALLS_REAL_METHODS ) ; org . gradoop . common . model . impl . id . GradoopId id = org... | org . junit . Assert . assertNotNull ( graphElementMock . getGraphIds ( ) ) |
buildAsyncThreadObserverTest ( ) { final roboguice . event . EventListener outputListener = eventListenerDecorator . decorate ( EventThread . BACKGROUND , eventListener ) ; "<AssertPlaceHolder>" ; } decorate ( roboguice . event . EventThread , roboguice . event . EventListener ) { switch ( threadType ) { case UI : retu... | org . junit . Assert . assertEquals ( eventListener , ( ( roboguice . event . eventListener . AsynchronousEventListenerDecorator ) ( outputListener ) ) . eventListener ) |
datasetShouldNotBeDeaccessionedWithArchivedAndDraftVersions ( ) { java . util . List < edu . harvard . iq . dataverse . DatasetVersion > versionList = new java . util . ArrayList < edu . harvard . iq . dataverse . DatasetVersion > ( ) ; versionList . add ( this . archivedVersion ) ; versionList . add ( this . draftVers... | org . junit . Assert . assertFalse ( dataset . isDeaccessioned ( ) ) |
spawnSuperPower ( ) { com . fundynamic . d2tm . game . types . EntityData deathhand = entityRepository . getEntityData ( EntityType . SUPERPOWER , "DEATHHAND" ) ; com . fundynamic . d2tm . game . entities . superpowers . SuperPower superPower = entityRepository . spawnSuperPower ( com . fundynamic . d2tm . math . Coord... | org . junit . Assert . assertThat ( superPower . getCoordinate ( ) , org . hamcrest . core . Is . is ( com . fundynamic . d2tm . math . Coordinate . zero ( ) ) ) |
testCreateThreadSubscription ( ) { when ( mockAuthorizationManager . canSubscribe ( userInfo , objectId , SubscriptionObjectType . THREAD ) ) . thenReturn ( AuthorizationManagerUtil . AUTHORIZED ) ; when ( mockDao . create ( userId . toString ( ) , objectId , SubscriptionObjectType . THREAD ) ) . thenReturn ( sub ) ; t... | org . junit . Assert . assertEquals ( sub , manager . create ( userInfo , topic ) ) |
testNeedBalance ( ) { float minCost = conf . getFloat ( "hbase.master.balancer.stochastic.minCostNeedBalance" , 0.05F ) ; conf . setFloat ( "hbase.master.balancer.stochastic.minCostNeedBalance" , 1.0F ) ; loadBalancer . setConf ( conf ) ; for ( int [ ] mockCluster : clusterStateMocks ) { java . util . Map < org . apach... | org . junit . Assert . assertNull ( plans ) |
matchTimeOnlyTestExactTimeMatch ( ) { org . dcm4che3 . data . Attributes testAttrs = new org . dcm4che3 . data . Attributes ( ) ; java . lang . String tmString = "121212.000" ; java . util . List < org . dcm4chee . archive . entity . Study > studies = createTimeRangeQuery ( testAttrs , tmString ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertThat ( studies . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
shouldAlignNumericValuesToLeftIfSpecified2 ( ) { stubFieldType ( java . lang . String . class ) ; gridColumn . addField ( fieldDefinition ) ; gridColumn . setAlign ( Alignment . LEFT ) ; "<AssertPlaceHolder>" ; } getAlign ( ) { return this . align ; } | org . junit . Assert . assertEquals ( Alignment . LEFT , gridColumn . getAlign ( ) ) |
saveAccountWithNullCounts ( ) { io . pivotal . springtrader . accounts . domain . Account acc = io . pivotal . springtrader . accounts . ServiceTestConfiguration . account ( ) ; io . pivotal . springtrader . accounts . domain . Account accNull = io . pivotal . springtrader . accounts . ServiceTestConfiguration . accoun... | org . junit . Assert . assertEquals ( service . saveAccount ( accNull ) , acc . getId ( ) ) |
testComplexArrayValuesBuilder ( ) { software . amazon . kinesis . multilang . config . BuilderDynaBeanTest . TestVariantBuilder variant1 = software . amazon . kinesis . multilang . config . BuilderDynaBeanTest . TestVariantBuilder . builder ( ) . variantBuilderName ( "variant-1" ) . testEnum ( software . amazon . kines... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . equalTo ( expected ) ) |
testDateIntegerNull ( ) { java . lang . Class < com . j256 . ormlite . field . types . DateIntegerTypeTest . LocalDateInteger > clazz = com . j256 . ormlite . field . types . DateIntegerTypeTest . LocalDateInteger . class ; com . j256 . ormlite . dao . Dao < com . j256 . ormlite . field . types . DateIntegerTypeTest . ... | org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) ) |
stream5 ( ) { net . time4j . PlainTimestamp start = net . time4j . PlainTimestamp . of ( 2014 , 5 , 1 , 23 , 0 ) ; net . time4j . PlainTimestamp end = start . plus ( 1 , ClockUnit . NANOS ) ; net . time4j . range . TimestampInterval interval = net . time4j . range . TimestampInterval . between ( start , end ) ; net . t... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( java . util . Collections . singletonList ( start ) ) ) |
testToString ( ) { this . roleAssignment = new edu . harvard . iq . dataverse . RoleAssignment ( this . dataverseRole , this . roleAssignee , this . dataset , this . privateUrlToken ) ; java . lang . String id = java . lang . String . valueOf ( this . roleAssignment . getId ( ) ) ; java . lang . String assigneeIdentifi... | org . junit . Assert . assertEquals ( expectedString , this . roleAssignment . toString ( ) ) |
testImportClass02 ( ) { javax . el . ImportHandler handler = new javax . el . ImportHandler ( ) ; handler . importClass ( "org.apache.tomcat.util.res.StringManagerX" ) ; java . lang . Class < ? > result = handler . resolveClass ( "StringManagerX" ) ; "<AssertPlaceHolder>" ; } resolveClass ( java . lang . String ) { if ... | org . junit . Assert . assertNull ( result ) |
testMapIdentityWithNoGroupReference ( ) { final java . util . Properties properties = new java . util . Properties ( ) ; properties . setProperty ( "nifi.security.identity.mapping.pattern.dn" , "^cn=(.*?),dc=(.*?),dc=(.*?)$" ) ; properties . setProperty ( "nifi.security.identity.mapping.value.dn" , "this<sp>makes<sp>no... | org . junit . Assert . assertEquals ( "this<sp>makes<sp>no<sp>sense" , mappedIdentity ) |
testGetAutoDecodedStringChinese ( ) { java . lang . String testStr = "12345678ikbsdfghjklsdlzxcvbnm,.:LGF)(&^%^RYVG" ; java . lang . String rtnEncode = org . ngrinder . common . util . EncodingUtils . detectEncoding ( testStr . getBytes ( "EUC-KR" ) , "EUC-KR" ) ; "<AssertPlaceHolder>" ; } detectEncoding ( byte [ ] , j... | org . junit . Assert . assertThat ( rtnEncode , org . hamcrest . Matchers . is ( "EUC-KR" ) ) |
ViolationsInDirect_CompareToNumberOfInDirectDependencies_violatingfrom_indirectto ( ) { java . lang . String fromUnit = "domain.indirect.violatingfrom" ; java . lang . String toUnit = "domain.indirect.indirectto" ; husaccttest . analyse . Java_AccuracyTestDependencyDetection . analyseService = husacct . ServiceProvider... | org . junit . Assert . assertTrue ( ( numberOfDependencies == numberOfViolations ) ) |
testGetStreamMockRootStorageContainerStore ( ) { java . lang . String colName = "test-get-namespace-no-root-storage-container-store" ; java . lang . String streamName = colName ; org . apache . bookkeeper . stream . proto . storage . GetStreamResponse getResp = org . apache . bookkeeper . stream . proto . storage . Get... | org . junit . Assert . assertTrue ( ( getResp == ( getRespFuture . get ( ) ) ) ) |
checkMessageMethod ( ) { java . lang . String str = "test" ; info . smart_tools . smartactors . base . exception . invalid_state_exception . InvalidStateException exception = new info . smart_tools . smartactors . base . exception . invalid_state_exception . InvalidStateException ( str ) ; "<AssertPlaceHolder>" ; throw... | org . junit . Assert . assertEquals ( exception . getMessage ( ) , str ) |
testBlankExpression ( ) { org . eclipse . birt . data . engine . api . querydefn . QueryDefinition queryDefn = newReportQuery ( ) ; java . lang . String [ ] name = new java . lang . String [ ] { "testColumn1" } ; org . eclipse . birt . data . engine . api . querydefn . ScriptExpression [ ] se = new org . eclipse . birt... | org . junit . Assert . assertNotNull ( error ) |
testGetMetricRegistryFromCamelRegistry ( ) { when ( camelRegistry . lookupByNameAndType ( "name" , com . codahale . metrics . MetricRegistry . class ) ) . thenReturn ( metricRegistry ) ; com . codahale . metrics . MetricRegistry result = component . getMetricRegistryFromCamelRegistry ( camelRegistry , "name" ) ; "<Asse... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( metricRegistry ) ) |
test_GetWindow_By_Name ( ) { when ( element . findFirst ( mmarquee . automation . BaseAutomationTest . isTreeScope ( TreeScope . Descendants ) , any ( ) ) ) . thenReturn ( targetElement ) ; mmarquee . automation . controls . AutomationWindow window = panel . getWindow ( mmarquee . automation . controls . Search . getBu... | org . junit . Assert . assertEquals ( targetElement , window . getElement ( ) ) |
rejectKeysValues ( ) { org . eclipse . collections . api . multimap . Multimap < java . lang . String , java . lang . Integer > multimap = this . newMultimapWithKeysValues ( "One" , 1 , "One" , 12 , "Two" , 2 , "Two" , 4 ) ; org . eclipse . collections . api . multimap . Multimap < java . lang . String , java . lang . ... | org . junit . Assert . assertEquals ( this . newMultimapWithKeyValue ( "One" , 1 ) , rejectedMultimap ) |
testReadDataThrowException ( ) { org . mockito . Mockito . when ( fileReader . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( fileReader . readAllLine ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( new java . lang . String [ ] { "DL<sp>1488... | org . junit . Assert . assertNotNull ( attnrInfos ) |
testCreateMockProvider ( ) { java . lang . Class < ? extends de . akquinet . jbosscc . needle . mock . MockProvider > lookupMockProviderClass = de . akquinet . jbosscc . needle . mock . EasyMockProvider . class ; de . akquinet . jbosscc . needle . injection . InjectionConfiguration injectionConfiguration = new de . akq... | org . junit . Assert . assertTrue ( ( mockProvider instanceof de . akquinet . jbosscc . needle . mock . EasyMockProvider ) ) |
version_java9_majoronly ( ) { java . lang . System . setProperty ( "java.version" , "9" ) ; com . oracle . bmc . util . JavaRuntimeUtils . JreVersion version = com . oracle . bmc . util . JavaRuntimeUtils . parse ( ) ; "<AssertPlaceHolder>" ; } parse ( ) { com . oracle . bmc . util . JavaRuntimeUtils . JreVersion versi... | org . junit . Assert . assertEquals ( JreVersion . Java_9 , version ) |
testClone_Stereo ( ) { org . openscience . cdk . interfaces . IChemObject object = newChemObject ( ) ; org . openscience . cdk . interfaces . IAtom atom1 = object . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ; org . openscience . cdk . interfaces . IAtom atom2 = object .... | org . junit . Assert . assertEquals ( IBond . Stereo . UP , clone . getStereo ( ) ) |
transform_ds_rdata_remove_spaces ( ) { final net . ripe . db . whois . common . rpsl . RpslObject rpslObject = net . ripe . db . whois . common . rpsl . RpslObject . parse ( ( "" + ( "domain:<sp>17.45.212.in-addr.arpa\n" + "ds-rdata:<sp>52314<sp>5<sp>1<sp>93B5837D4E5C063<sp>A3728FAA72BA64<sp>068F89B39DF" ) ) ) ; final ... | org . junit . Assert . assertThat ( result . getValueForAttribute ( AttributeType . DS_RDATA ) . toString ( ) , org . hamcrest . Matchers . is ( "52314<sp>5<sp>1<sp>93B5837D4E5C063A3728FAA72BA64068F89B39DF" ) ) |
testBroadcastAMin ( ) { org . nd4j . linalg . api . ndarray . INDArray matrix = org . nd4j . linalg . factory . Nd4j . create ( 5 , 5 ) ; for ( int r = 0 ; r < ( matrix . rows ( ) ) ; r ++ ) { matrix . getRow ( r ) . assign ( org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 2 , 3 , 3 , 4 , 1 } ) ) ; } o... | org . junit . Assert . assertEquals ( org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 3 , 4 , 1 } ) , matrix . getRow ( r ) ) |
testValidateLimits1 ( ) { java . lang . String string = new java . lang . String ( new int [ ] { 57344 } , 0 , 1 ) ; boolean result = org . oscm . validator . ADMValidator . containsOnlyValidIdChars ( string ) ; "<AssertPlaceHolder>" ; } containsOnlyValidIdChars ( java . lang . String ) { if ( value == null ) { return ... | org . junit . Assert . assertTrue ( result ) |
getPinpointEndpointIdTestNullContext ( ) { android . content . SharedPreferences sharedPreferences = android . support . test . InstrumentationRegistry . getTargetContext ( ) . getSharedPreferences ( ( ( TEST_PP_APP_ID_1 ) + ( PP_PREFERENCES_AND_FILE_MANAGER_SUFFIX ) ) , Context . MODE_PRIVATE ) ; sharedPreferences . e... | org . junit . Assert . assertNull ( pp_endpoint ) |
testGetNoIdentifiable ( ) { com . google . appengine . api . memcache . MemcacheService . IdentifiableValue identifiable = memcache . getIdentifiable ( "no_such_key1" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNull ( identifiable ) |
givenEmptyStack_whenElementIsPushed_thenStackSizeisIncreased ( ) { java . util . Stack intStack = new java . util . Stack ( ) ; intStack . push ( 1 ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , intStack . size ( ) ) |
testGetFileInfoEvictNewFile ( ) { org . apache . bookkeeper . bookie . IndexPersistenceMgr indexPersistenceMgr = null ; try { indexPersistenceMgr = getPersistenceManager ( 10 ) ; org . apache . bookkeeper . bookie . FileInfo fi = indexPersistenceMgr . getFileInfo ( lid , masterKey ) ; fi . setFenced ( ) ; fillCache ( i... | org . junit . Assert . assertEquals ( true , fi . isFenced ( ) ) |
testHashCode ( ) { final nl . bzk . brp . domain . expressie . Datumdeel datumdeel1 = nl . bzk . brp . domain . expressie . Datumdeel . valueOf ( 10 ) ; final nl . bzk . brp . domain . expressie . Datumdeel datumdeel2 = nl . bzk . brp . domain . expressie . Datumdeel . valueOf ( 10 ) ; "<AssertPlaceHolder>" ; } hashCod... | org . junit . Assert . assertEquals ( datumdeel1 . hashCode ( ) , datumdeel2 . hashCode ( ) ) |
testForeach01 ( ) { java . lang . String source = "if<sp>($installedManifestsRef<sp>==<sp>$installedManifestsCur)<sp>{true;}else<sp>{var<sp>installedManifestsRefIds=[ref.getId()<sp>for<sp>each<sp>(ref<sp>in<sp>$installedManifestsRef)];" + ( ( "var<sp>installedManifestsCurIds=[cur.getId()<sp>for<sp>each<sp>(cur<sp>in<sp... | org . junit . Assert . assertEquals ( true , result ) |
getMaxValueNameLen ( ) { final com . rapid7 . client . dcerpc . msrrp . dto . RegistryKeyInfo keyInfo = new com . rapid7 . client . dcerpc . msrrp . dto . RegistryKeyInfo ( 0 , 0 , 0 , 0 , 255 , 0 , 0 , 0L ) ; "<AssertPlaceHolder>" ; } getMaxValueNameLen ( ) { return maxValueNameLen ; } | org . junit . Assert . assertEquals ( 255 , keyInfo . getMaxValueNameLen ( ) ) |
testRangeIterator20m ( ) { java . util . Set < com . rackspacecloud . blueflood . types . Range > expectedRanges = com . rackspacecloud . blueflood . rollup . SlotTest . makeRanges ( Granularity . MIN_20 , 3600000 , 33 ) ; java . util . Set < com . rackspacecloud . blueflood . types . Range > actualRanges = new java . ... | org . junit . Assert . assertEquals ( expectedRanges , actualRanges ) |
testImportTechnicalServices_keepOnBehalfActingFlagWithSubscription ( ) { java . lang . String tsxml = org . oscm . test . data . TSXML . createTSXMLWithAllowingOnBehalfActing ( "true" ) ; svcProv . importTechnicalServices ( tsxml . getBytes ( "UTF-8" ) ) ; createOneSubscription ( SubscriptionStatus . ACTIVE ) ; tsxml =... | org . junit . Assert . assertTrue ( techPrd . isAllowingOnBehalfActing ( ) ) |
testIsMax2Of3d ( ) { double [ ] [ ] [ ] slices = new double [ 3 ] [ ] [ ] ; double [ ] [ ] [ ] isMax = new double [ 3 ] [ ] [ ] ; slices [ 0 ] = new double [ ] [ ] { new double [ ] { 1 , 10 , 2 } , new double [ ] { 3 , 4 , 5 } } ; slices [ 1 ] = new double [ ] [ ] { new double [ ] { - 10 , - 9 , - 8 } , new double [ ] ... | org . junit . Assert . assertEquals ( expected , arr ) |
testOptionalSqlClauseStringString ( ) { java . lang . String staticPart = "static" ; java . lang . String variablePart = "variable" ; classUnderTest = new net . sourceforge . squirrel_sql . fw . dialects . OptionalSqlClause ( staticPart , variablePart ) ; java . lang . String result = classUnderTest . toString ( ) ; "<... | org . junit . Assert . assertEquals ( ( ( staticPart + "<sp>" ) + variablePart ) , result ) |
setIllegalVisible ( ) { org . jboss . hal . ballroom . dataprovider . PageInfo pageInfo = new org . jboss . hal . ballroom . dataprovider . PageInfo ( org . jboss . hal . ballroom . dataprovider . PageInfoTest . PAGE_SIZE , 0 , 50 , 100 ) ; pageInfo . setVisible ( 101 ) ; "<AssertPlaceHolder>" ; } getVisible ( ) { retu... | org . junit . Assert . assertEquals ( 100 , pageInfo . getVisible ( ) ) |
testGetWizardIconOk ( ) { java . io . InputStream iconStream = getComponentService ( ) . getWizardPngImage ( TestComponentWizardDefinition . COMPONENT_WIZARD_NAME , WizardImageType . TREE_ICON_16X16 ) ; "<AssertPlaceHolder>" ; } getWizardPngImage ( java . lang . String , org . talend . components . api . wizard . Wizar... | org . junit . Assert . assertNotNull ( iconStream ) |
testUnknownNamedArg ( ) { java . lang . String dir = getRandomDir ( ) ; java . lang . String groupFile = "f(x,y)<sp>::=<sp>\"<x><y>\"\n" + "g()<sp>::=<sp>\"<f(x={a},z={b})>\"" ; writeFile ( dir , "group.stg" , groupFile ) ; org . stringtemplate . v4 . STGroupFile group = new org . stringtemplate . v4 . STGroupFile ( ( ... | org . junit . Assert . assertEquals ( expected , result ) |
testIsEnabledForWan ( ) { org . eclipse . kura . net . admin . monitor . DnsMonitorServiceImpl svc = new org . eclipse . kura . net . admin . monitor . DnsMonitorServiceImpl ( ) ; java . util . Set < org . eclipse . kura . net . NetworkPair < org . eclipse . kura . net . IP4Address > > allowedNetworks = new java . util... | org . junit . Assert . assertTrue ( result ) |
or ( ) { io . robe . hibernate . criteria . api . criterion . Restriction r1 = new io . robe . hibernate . criteria . api . criterion . Restriction ( io . robe . hibernate . criteria . query . Operator . EQUALS , "name" , "Gol<sp>D.<sp>Roger" ) ; io . robe . hibernate . criteria . api . criterion . Restriction r2 = new... | org . junit . Assert . assertEquals ( expectedRestriction , restriction ) |
deserializeTest ( ) { try { de . nx42 . maps4cim . update . Update u = de . nx42 . maps4cim . util . Serializer . deserialize ( de . nx42 . maps4cim . update . Update . class , de . nx42 . maps4cim . update . UpdateTest . serialize , de . nx42 . maps4cim . update . UpdateTest . schema ) ; "<AssertPlaceHolder>" ; } catc... | org . junit . Assert . assertNotNull ( u . getStable ( ) . version ) |
MOVEIf_Match ( ) { final java . lang . String srcCol = "davColforMOVE" ; final java . lang . String destCol = "destCol" ; final java . lang . String destUrl = com . fujitsu . dc . test . unit . core . UrlUtils . box ( com . fujitsu . dc . test . jersey . box . dav . col . MoveCollectionHeaderValidateTest . CELL_NAME , ... | org . junit . Assert . assertEquals ( HttpStatus . SC_CREATED , response . getStatusCode ( ) ) |
empty ( ) { java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . lang . String > > parameters = java . util . Collections . emptyMap ( ) ; when ( mockTracker . getDeviceStatuses ( "domain" ) ) . thenReturn ( parameters ) ; command . executeWithTracker ( mockTracker ) ; java . uti... | org . junit . Assert . assertThat ( statuses . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
elNotSupported ( ) { "<AssertPlaceHolder>" ; } isSupported ( ) { return com . github . dozermapper . core . el . ELExpressionFactory . isSupported ( com . github . dozermapper . core . el . ELExpressionFactory . class . getClassLoader ( ) ) ; } | org . junit . Assert . assertFalse ( com . github . dozermapper . core . el . ELExpressionFactory . isSupported ( ) ) |
testGetRows ( ) { macrobase . conf . MacroBaseConf conf = new macrobase . conf . MacroBaseConf ( ) ; conf . set ( MacroBaseConf . CSV_INPUT_FILE , "src/test/resources/data/simple.csv" ) ; conf . set ( MacroBaseConf . ATTRIBUTES , com . google . common . collect . Lists . newArrayList ( "A2" , "A5" ) ) ; conf . set ( Ma... | org . junit . Assert . assertEquals ( 1 , rs . getRows ( ) . size ( ) ) |
checkTime4 ( ) { com . alibaba . fastjson . parser . JSONScanner objectUnderTest = ( ( com . alibaba . fastjson . parser . JSONScanner ) ( com . diffblue . deeptestutils . Reflector . getInstance ( "com.alibaba.fastjson.parser.JSONScanner" ) ) ) ; objectUnderTest . hasSpecial = false ; objectUnderTest . token = 0 ; obj... | org . junit . Assert . assertEquals ( false , retval ) |
unregisterFailNotRegisteredObject ( ) { final com . github . rinde . rinsim . core . model . ModelManager mm = new com . github . rinde . rinsim . core . model . ModelManager ( com . google . common . collect . ImmutableSet . of ( com . github . rinde . rinsim . core . model . road . RoadModelBuilders . staticGraph ( n... | org . junit . Assert . assertTrue ( fail ) |
testShouldCountDraftsIfOwner ( ) { com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( group . getGroupId ( ) ) ; com . liferay . document . library . kernel . service . DLAppServiceUtil . addFileEntry (... | org . junit . Assert . assertEquals ( 2 , foldersAndFileEntriesAndFileShortcutsCount ) |
shouldExecuteImmediately ( ) { org . jboss . netty . handler . ssl . ImmediateExecutor e = ImmediateExecutor . INSTANCE ; long startTime = java . lang . System . nanoTime ( ) ; e . execute ( new java . lang . Runnable ( ) { public void run ( ) { long startTime = java . lang . System . nanoTime ( ) ; for ( ; ; ) { try {... | org . junit . Assert . assertTrue ( ( ( ( java . lang . System . nanoTime ( ) ) - startTime ) >= 1000000000L ) ) |
testGivenMaxMin ( ) { double tolerancePerc = 1 ; int nSamples = 500 ; int nFeatures = 3 ; org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; org . nd4j . linalg . api . ndarray . INDArray featureSet = org . nd4j . linalg . factory . Nd4j . rand ( nSamples , nFeatures ) ; org . nd4j . linalg . ap... | org . junit . Assert . assertTrue ( ( maxdeltaPerc < tolerancePerc ) ) |
testShiftArray ( ) { byte [ ] input = new byte [ ] { ( ( byte ) ( 128 ) ) , ( ( byte ) ( 1 ) ) } ; byte [ ] output = new byte [ 4 ] ; dk . alexandra . fresco . framework . util . ByteArrayHelper . shiftArray ( input , output , 1 ) ; byte [ ] expected = new byte [ ] { ( ( byte ) ( 64 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ... | org . junit . Assert . assertEquals ( expected [ i ] , output [ i ] ) |
encodeShouldSucceed ( ) { io . netty . handler . codec . http2 . Http2Headers headers = io . netty . handler . codec . http2 . DefaultHttp2HeadersEncoderTest . headers ( ) ; io . netty . buffer . ByteBuf buf = io . netty . buffer . Unpooled . buffer ( ) ; try { encoder . encodeHeaders ( 3 , headers , buf ) ; "<AssertPl... | org . junit . Assert . assertTrue ( ( ( buf . writerIndex ( ) ) > 0 ) ) |
getCache ( ) { doReturn ( 1 ) . when ( type ) . getType ( ) ; doReturn ( cacheMap ) . when ( cacheCoordinator ) . getOrCreate ( ) ; doReturn ( cache ) . when ( cacheMap ) . get ( anyInt ( ) ) ; com . cetsoft . imcache . cache . Cache actualCache = cacheCoordinator . getCache ( type ) ; "<AssertPlaceHolder>" ; } getCach... | org . junit . Assert . assertEquals ( cache , actualCache ) |
testCreate ( ) { com . ctrip . xpipe . simpleserver . Server server = startEmptyServer ( ) ; com . ctrip . xpipe . redis . proxy . monitor . stats . PingStats pingStats = manager . create ( new com . ctrip . xpipe . redis . core . proxy . endpoint . DefaultProxyEndpoint ( java . lang . String . format ( "%s://%s:%d" , ... | org . junit . Assert . assertNotNull ( pingStats ) |
difference_of_sets_guava ( ) { java . util . Set < java . lang . String > possibleFriendRequests = com . google . common . collect . Sets . difference ( yourFriends , myFriends ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 6 , possibleFriendRequests . size ( ) ) |
testColor ( ) { for ( java . lang . reflect . Field field : java . awt . Color . class . getFields ( ) ) { if ( ( java . lang . reflect . Modifier . isStatic ( field . getModifiers ( ) ) ) && ( java . awt . Color . class . isAssignableFrom ( field . getType ( ) ) ) ) { java . awt . Color color = ( ( java . awt . Color ... | org . junit . Assert . assertEquals ( color , org . spout . api . util . ByteBufUtils . readColor ( buf ) ) |
testIterateExp01 ( ) { testpackage . Class1 class1 ; class1 = new testpackage . Class1 ( ) ; "<AssertPlaceHolder>" ; } testIterateExp01 ( ) { testpackage . Class1 class1 ; class1 = new testpackage . Class1 ( ) ; org . junit . Assert . assertEquals ( new java . lang . Integer ( 6 ) , class1 . testIterateExp01 ( ) ) ; } | org . junit . Assert . assertEquals ( new java . lang . Integer ( 6 ) , class1 . testIterateExp01 ( ) ) |
testConditionalFalse ( ) { executeWithDefaultScope ( "intVar<sp>=<sp>false<sp>?<sp>42<sp>:<sp>1" ) ; "<AssertPlaceHolder>" ; } getIntValue ( ) { return context . getVariable ( "intVar" ) . getValue ( ) ; } | org . junit . Assert . assertEquals ( 1L , getIntValue ( ) ) |
size_A$ ( ) { com . m3 . scalaflavor4j . List < java . lang . String > list = com . m3 . scalaflavor4j . Arrays . asList ( "a" , "b" , "c" ) ; com . m3 . scalaflavor4j . Seq < java . lang . String > seq = com . m3 . scalaflavor4j . IndexedSeq . apply ( list ) ; java . lang . Integer actual = seq . size ( ) ; java . lan... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
getAccessTokenHash512 ( ) { mockToken512 . getJwt ( ) . serialize ( ) ; com . nimbusds . jose . util . Base64URL expectedHash = new com . nimbusds . jose . util . Base64URL ( "vGH3QMY-knpACkLgzdkTqu3C9jtvbf2Wk_RSu2vAx8k" ) ; com . nimbusds . jose . util . Base64URL resultHash = org . mitre . openid . connect . util . I... | org . junit . Assert . assertEquals ( expectedHash , resultHash ) |
testIsClassLoaderReusableDefault ( ) { org . talend . components . api . component . runtime . JarRuntimeInfo jarRuntimeInfo = new org . talend . components . api . component . runtime . JarRuntimeInfo ( "http://dummyurl" , "dummyString" , "dummyString" ) ; "<AssertPlaceHolder>" ; } isClassLoaderReusable ( ) { return r... | org . junit . Assert . assertTrue ( jarRuntimeInfo . isClassLoaderReusable ( ) ) |
testSwapElements_6 ( ) { org . la4j . Vector a = v ( 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , ( - 5.0 ) ) ; org . la4j . Vector b = v ( 0.0 , 0.0 , 0.0 , ( - 5.0 ) , 0.0 , 0.0 ) ; a . swapElements ( 3 , 5 ) ; "<AssertPlaceHolder>" ; } swapElements ( int , int ) { if ( i != j ) { double d = self [ i ] ; self [ i ] = self [ j ] ; s... | org . junit . Assert . assertEquals ( a , b ) |
testSerialization ( ) { org . jfree . data . category . DefaultCategoryDataset d1 = new org . jfree . data . category . DefaultCategoryDataset ( ) ; d1 . setValue ( 23.4 , "R1" , "C1" ) ; org . jfree . data . category . DefaultCategoryDataset d2 = ( ( org . jfree . data . category . DefaultCategoryDataset ) ( org . jfr... | org . junit . Assert . assertEquals ( d1 , d2 ) |
testFromXml_Null ( ) { final org . esa . snap . core . datamodel . MetadataElement metadataElement = serializer . fromXml ( null ) ; "<AssertPlaceHolder>" ; } fromXml ( java . lang . String ) { return new org . esa . snap . core . gpf . annotations . ParameterBlockConverter ( ) . convertXmlToObject ( xml , new com . bc... | org . junit . Assert . assertNull ( metadataElement ) |
testBaseDirectory ( ) { java . util . Map < java . lang . String , java . io . Serializable > map = new java . util . HashMap ( ) ; map . put ( GeoPkgDataStoreFactory . DBTYPE . key , "geopkg" ) ; map . put ( GeoPkgDataStoreFactory . DATABASE . key , "foo.gpkg" ) ; org . geotools . geopkg . GeoPkgDataStoreFactory facto... | org . junit . Assert . assertTrue ( new java . io . File ( tmp . getRoot ( ) , "foo.gpkg" ) . exists ( ) ) |
testOneEscapeByteStuffed ( ) { byte [ ] decodedPayload = new byte [ ] { 1 , 2 , HdlcTranslateConstants . ESCAPE_BYTE , 3 , 4 } ; byte [ ] expectedEncodedPayload = new byte [ ] { HdlcTranslateConstants . FRAME_DELIMITER_BYTE , 1 , 2 , HdlcTranslateConstants . ESCAPE_BYTE , ( HdlcTranslateConstants . ESCAPE_BYTE ) ^ 32 ,... | org . junit . Assert . assertArrayEquals ( expectedEncodedPayload , actualEncodedPayload ) |
testMatchConditionAllDimensions3 ( ) { org . nd4j . linalg . api . ndarray . INDArray array = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0 , 1 , 2 , 3 , Double . NEGATIVE_INFINITY , 5 , 6 , 7 , 8 , 9 } ) ; int val = ( ( int ) ( org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new... | org . junit . Assert . assertEquals ( 1 , val ) |
testIndividualUrlParameters ( ) { final java . lang . String url = "https://api.eatstreet.com/api/v2/CitiesByState.json" ; final java . lang . String paramName = "param1" ; final java . lang . String paramValue = "test" ; final java . lang . String urlWithParams = ( ( ( url + "?" ) + paramName ) + "=" ) + paramValue ; ... | org . junit . Assert . assertEquals ( urlWithParams , jurlUrl ) |
selectWildcardObject ( ) { com . fasterxml . jackson . databind . JsonNode nodeStore = com . nebhale . jsonpath . internal . component . NODE . get ( "store" ) ; com . fasterxml . jackson . databind . node . ArrayNode expected = com . fasterxml . jackson . databind . node . JsonNodeFactory . instance . arrayNode ( ) ; ... | org . junit . Assert . assertEquals ( expected , result ) |
testRMAppSubmitAMContainerResourceRequestsDisagree ( ) { asContext . setResource ( null ) ; java . util . List < org . apache . hadoop . yarn . api . records . ResourceRequest > reqs = new java . util . ArrayList ( ) ; when ( mockDefaultQueueInfo . getAccessibleNodeLabels ( ) ) . thenReturn ( new java . util . HashSet ... | org . junit . Assert . assertEquals ( reqs , app . getAMResourceRequests ( ) ) |
simple ( ) { java . io . File shell = putScript ( "arguments.sh" , "bin/script.sh" ) ; com . asakusafw . yaess . core . CommandScript script = new com . asakusafw . yaess . core . CommandScript ( "testing" , set ( ) , "profile" , "module" , java . util . Arrays . asList ( shell . getAbsolutePath ( ) , "Hello,<sp>world!... | org . junit . Assert . assertThat ( results , is ( java . util . Arrays . asList ( "Hello,<sp>world!" ) ) ) |
testGetRequestBodyFromStreamWithDefaultCharset ( ) { httpEntity = new org . apache . http . entity . StringEntity ( ENTITY_CONTENT , java . nio . charset . Charset . defaultCharset ( ) ) ; apacheRequest . setHeader ( "Content-type" , "text/plain" ) ; apacheRequest . setEntity ( httpEntity ) ; java . lang . String resul... | org . junit . Assert . assertEquals ( ENTITY_CONTENT , result ) |
test1704261 ( ) { sql = "UPDATE<sp>I_Conversion_Rate<sp>i<sp>SET<sp>MultiplyRate<sp>=<sp>1<sp>/<sp>DivideRate<sp>WHERE<sp>(MultiplyRate<sp>IS<sp>NULL<sp>OR<sp>MultiplyRate<sp>=<sp>0)<sp>AND<sp>DivideRate<sp>IS<sp>NOT<sp>NULL<sp>AND<sp>DivideRate<>0<sp>AND<sp>I_IsImported<>'Y'<sp>AND<sp>AD_Client_ID=1000000" ; sqe = "UP... | org . junit . Assert . assertEquals ( sqe , convertResult . get ( 0 ) ) |
testSubmitDAGAppFailed ( ) { final org . apache . tez . client . TestTezClient . TezClientForTest client = configureAndCreateTezClient ( ) ; client . start ( ) ; client . callRealGetSessionAMProxy = true ; java . lang . String msg = "Application<sp>Test<sp>Failed" ; when ( client . mockYarnClient . getApplicationReport... | org . junit . Assert . assertTrue ( e . getMessage ( ) . contains ( msg ) ) |
testGetLeadFail ( ) { inputProperties . inputOperation . setValue ( getLead ) ; inputProperties . leadKeyTypeSOAP . setValue ( org . talend . components . marketo . runtime . client . EMAIL ) ; inputProperties . afterInputOperation ( ) ; inputProperties . leadKeyValue . setValue ( org . talend . components . marketo . ... | org . junit . Assert . assertEquals ( emptyList ( ) , records ) |
testLoadWithError ( ) { config = new org . apache . commons . configuration2 . plist . PropertyListConfiguration ( ) ; try { new org . apache . commons . configuration2 . io . FileHandler ( config ) . load ( new java . io . StringReader ( "" ) ) ; org . junit . Assert . fail ( "No<sp>exception<sp>thrown<sp>on<sp>loadin... | org . junit . Assert . assertNotNull ( e . getMessage ( ) ) |
testAgent ( ) { java . lang . String sqlInsertUser = "insert<sp>into<sp>au_userInfo(userId,USERNAME)<sp>VALUES<sp>('test_admin2','2')" ; jdbcTemplate . execute ( sqlInsertUser ) ; java . lang . String agentId = org . foxbpm . engine . impl . util . GuidUtil . CreateGuid ( ) ; identityService . deleteAgent ( agentId ) ;... | org . junit . Assert . assertEquals ( 0 , agentInfos . size ( ) ) |
testNodeTypeInWithURIFilter ( ) { org . hawkular . apm . api . model . config . CollectorConfiguration cc = new org . hawkular . apm . api . model . config . CollectorConfiguration ( ) ; org . hawkular . apm . api . model . config . txn . TransactionConfig btc = new org . hawkular . apm . api . model . config . txn . T... | org . junit . Assert . assertEquals ( "second" , service . getProperties ( "test" ) . iterator ( ) . next ( ) . getValue ( ) ) |
testInsaturationT ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( INSATURATION , 2 ) ; org . openscience . cdk . interfaces . IAtom atom = mock ( org . openscience . cdk . interfaces . IAtom . class ) ; org . openscience . cdk . interfac... | org . junit . Assert . assertTrue ( expr . matches ( atom ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.