input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testOtherTablesAutoPass ( ) { org . apache . hadoop . hbase . wal . WAL . Entry entry = new org . apache . hadoop . hbase . wal . WAL . Entry ( new org . apache . hadoop . hbase . wal . WALKeyImpl ( org . apache . phoenix . replication . SystemCatalogWALEntryFilterIT . REGION , org . apache . hadoop . hbase . TableName... | org . junit . Assert . assertEquals ( 1 , filter . filter ( entry ) . getEdit ( ) . size ( ) ) |
testConvertQueryRegistry ( ) { org . openehealth . ipf . platform . camel . ihe . xds . core . converters . QueryRegistry org = org . openehealth . ipf . commons . ihe . xds . core . SampleData . createFindDocumentsQuery ( ) ; org . openehealth . ipf . commons . ihe . xds . core . stub . ebrs30 . query . AdhocQueryRequ... | org . junit . Assert . assertEquals ( org , copy ) |
shouldFetchAllFormSubmissions ( ) { long baseTimeStamp = org . motechproject . util . DateUtil . now ( ) . getMillis ( ) ; org . ei . drishti . form . domain . FormSubmission firstFormSubmission = new org . ei . drishti . form . domain . FormSubmission ( "anm<sp>id<sp>1" , "instance<sp>id<sp>1" , "form<sp>name<sp>1" , ... | org . junit . Assert . assertEquals ( asList ( firstFormSubmission , secondFormSubmission ) , formSubmissions ) |
activatedPrivChatShouldNotResetNewPrivateMessageStatusIfCurrentlyFalse ( ) { androidUserInterface . activatedPrivChat ( testUser ) ; "<AssertPlaceHolder>" ; verifyZeroInteractions ( controller ) ; } isNewPrivMsg ( ) { return newPrivMsg ; } | org . junit . Assert . assertFalse ( testUser . isNewPrivMsg ( ) ) |
testRepartitioningForUnfinishedFiles ( ) { underTest . setPartitionCount ( 5 ) ; underTest . setPreferredMaxPendingFilesPerOperator ( 3 ) ; for ( int i = 0 ; i < 21 ; i ++ ) { underTest . pendingFiles . add ( ( "file-" + i ) ) ; } when ( mockPartition . getStats ( ) ) . thenReturn ( mockBatchStats ) ; int partitioncoun... | org . junit . Assert . assertEquals ( 5 , partitioncount ) |
testGetShuntsuCount ( ) { "<AssertPlaceHolder>" ; } getShuntsuCount ( ) { return shuntsuList . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , actual . getShuntsuCount ( ) ) |
validateMessageNotReceivedNoToNiFiChannel ( ) { org . apache . nifi . spring . SpringDataExchanger delegate = org . apache . nifi . spring . SpringContextFactory . createSpringContextDelegate ( "." , "context.xml" ) ; org . apache . nifi . spring . SpringDataExchanger . SpringResponse < ? > fromSpring = delegate . rece... | org . junit . Assert . assertNull ( fromSpring ) |
testPnrSave ( ) { gov . gtas . model . Flight f = new gov . gtas . model . Flight ( ) ; prepareFlightData ( f ) ; gov . gtas . model . Passenger passengerToUpdate = new gov . gtas . model . Passenger ( ) ; passengerToUpdate . setPassengerDetails ( new gov . gtas . model . PassengerDetails ( ) ) ; passengerToUpdate . se... | org . junit . Assert . assertNotNull ( pnr . getId ( ) ) |
verifyEditableByOwnernWhenCreatingNewObjectShouldNotThrowException2 ( ) { ch . puzzle . itc . mobiliar . business . foreignable . entity . ForeignableOwner editingOwner = ch . puzzle . itc . mobiliar . business . foreignable . entity . ForeignableOwner . MAIA ; ch . puzzle . itc . mobiliar . business . foreignable . en... | org . junit . Assert . assertTrue ( true ) |
testGetProcessedPredicate ( ) { org . apache . ambari . server . api . resources . ResourceDefinition resourceDefinition = new org . apache . ambari . server . api . resources . StackResourceDefinition ( ) ; java . util . Map < org . apache . ambari . server . controller . spi . Resource . Type , java . lang . String >... | org . junit . Assert . assertEquals ( expectedPredicate , processedPredicate ) |
testGetClientArea ( ) { org . eclipse . swt . widgets . Composite scrollable = new org . eclipse . swt . widgets . Composite ( shell , org . eclipse . swt . SWT . BORDER ) ; scrollable . setSize ( 100 , 100 ) ; org . eclipse . swt . graphics . Rectangle expected = new org . eclipse . swt . graphics . Rectangle ( 0 , 0 ... | org . junit . Assert . assertEquals ( expected , scrollable . getClientArea ( ) ) |
testUpdateGroup ( ) { org . camunda . bpm . engine . identity . Group group = identityService . newGroup ( "sales" ) ; group . setName ( "Sales" ) ; identityService . saveGroup ( group ) ; group = identityService . createGroupQuery ( ) . groupId ( "sales" ) . singleResult ( ) ; group . setName ( "Updated" ) ; identityS... | org . junit . Assert . assertEquals ( "Updated" , group . getName ( ) ) |
testDoUpdateForBlueprintExport_MultiHostProperty ( ) { java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . lang . String > > properties = new java . util . HashMap ( ) ; java . util . Map < java . lang . String , java . lang . String > typeProps = new java . util . HashMap ( ) ;... | org . junit . Assert . assertEquals ( "DATANODE" 1 , updatedVal ) |
testFluentOrQuery ( ) { com . github . jmkgreen . morphia . TestQuery . PhotoWithKeywords pwk = new com . github . jmkgreen . morphia . TestQuery . PhotoWithKeywords ( "scott" , "hernandez" ) ; ds . save ( pwk ) ; com . github . jmkgreen . morphia . AdvancedDatastore ads = ( ( com . github . jmkgreen . morphia . Advanc... | org . junit . Assert . assertEquals ( 1 , q . countAll ( ) ) |
testTxConflictHandling ( ) { int nFriendsBefore ; try ( com . syncleus . ferma . tx . Tx tx = graph . tx ( ) ) { p = addPersonWithFriends ( tx . getGraph ( ) , "Person2" ) ; manipulatePerson ( tx . getGraph ( ) , p ) ; tx . success ( ) ; nFriendsBefore = p . getFriends ( ) . size ( ) ; } java . util . concurrent . Cycl... | org . junit . Assert . assertEquals ( ( nFriendsBefore + 2 ) , nFriendsAfter ) |
testGetRasterWidth ( ) { "<AssertPlaceHolder>" ; } getRasterWidth ( ) { return 0 ; } | org . junit . Assert . assertEquals ( 200 , metadata . getRasterWidth ( ) ) |
testLengthUpper ( ) { org . opengrok . suggest . query . SuggesterRangeQuery q = new org . opengrok . suggest . query . SuggesterRangeQuery ( "test" , new org . apache . lucene . util . BytesRef ( "l" ) , new org . apache . lucene . util . BytesRef ( "upper" ) , true , false , SuggesterRangeQuery . SuggestPosition . UP... | org . junit . Assert . assertEquals ( "upper" . length ( ) , q . length ( ) ) |
testGetValue2 ( ) { org . jfree . data . statistics . DefaultMultiValueCategoryDataset d = new org . jfree . data . statistics . DefaultMultiValueCategoryDataset ( ) ; boolean pass = false ; try { d . getValue ( 0 , 0 ) ; } catch ( java . lang . IndexOutOfBoundsException e ) { pass = true ; } "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertTrue ( pass ) |
shouldAddJavaTempDirToVmArgs ( ) { com . google . common . collect . ImmutableList < java . lang . String > vmArgs = com . google . common . collect . ImmutableList . of ( "--one" ) ; com . facebook . buck . jvm . java . JavaTest rule = newRule ( vmArgs ) ; java . util . List < java . lang . String > amended = rule . a... | org . junit . Assert . assertEquals ( expected , amended ) |
testProtectedMethodTargetFromSubPackage ( ) { org . evosuite . Properties . CLASS_PREFIX = "com.examples.with.different.packagename" ; org . evosuite . Properties . TARGET_CLASS = "com.examples.with.different.packagename.Foo" ; java . lang . reflect . Method f = getMethod ( com . examples . with . different . packagena... | org . junit . Assert . assertFalse ( result ) |
testWarningsAreCleared ( ) { java . sql . Statement stmt = con . createStatement ( ) ; stmt . addBatch ( "CREATE<sp>TEMP<sp>TABLE<sp>unused<sp>(a<sp>int<sp>primary<sp>key)" ) ; stmt . executeBatch ( ) ; stmt . executeBatch ( ) ; "<AssertPlaceHolder>" ; org . postgresql . test . TestUtil . closeQuietly ( stmt ) ; } getW... | org . junit . Assert . assertNull ( stmt . getWarnings ( ) ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . trash . model . TrashVersion missingTrashVersion = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive... | org . junit . Assert . assertNull ( missingTrashVersion ) |
miscFeatures ( ) { listThreadLocal . get ( ) . add ( "a" ) ; "<AssertPlaceHolder>" ; java . util . stream . Stream . of ( new me . josephzhu . java8inaction . test . model . Product ( 1L , "bb" , 1.0 ) , new me . josephzhu . java8inaction . test . model . Product ( 2L , "aa" , 2.0 ) , new me . josephzhu . java8inaction... | org . junit . Assert . assertThat ( listThreadLocal . get ( ) . get ( 0 ) , org . hamcrest . CoreMatchers . is ( "a" ) ) |
ibanShouldReturnValidAccountType ( ) { org . iban4j . Iban iban = new org . iban4j . Iban . Builder ( ) . countryCode ( CountryCode . BR ) . bankCode ( "00360305" ) . branchCode ( "00001" ) . accountNumber ( "0009795493" ) . accountType ( "P" ) . ownerAccountType ( "1" ) . build ( ) ; "<AssertPlaceHolder>" ; } getAccou... | org . junit . Assert . assertThat ( iban . getAccountType ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( "P" ) ) ) |
getPatientIdentifierTypes_shouldReturnNonRetiredPatientIdentifierTypes_OrderedByRequiredAndName ( ) { org . openmrs . PatientIdentifierType openMRSIdNumber = dao . getPatientIdentifierType ( 1 ) ; org . openmrs . PatientIdentifierType oldIdNumber = dao . getPatientIdentifierType ( 2 ) ; oldIdNumber . setRequired ( true... | org . junit . Assert . assertArrayEquals ( new java . lang . Object [ ] { socialSecNumber , oldIdNumber , openMRSIdNumber , nationalIdNo } , patientIdentifierTypes . toArray ( ) ) |
testOpvragenDetailsPersoon ( ) { initMocks ( nl . bzk . brp . model . bevraging . levering . GeefDetailsPersoonBericht . class , SoortBericht . LVG_BVG_GEEF_DETAILS_PERSOON ) ; initBerichtVerwerker ( new java . util . ArrayList < nl . bzk . brp . model . validatie . Melding > ( ) , nl . bzk . brp . business . dto . bev... | org . junit . Assert . assertEquals ( testBericht , resultaat ) |
testSetOverTime ( ) { com . j256 . simplemetrics . metric . ControlledMetricAccum metric = new com . j256 . simplemetrics . metric . ControlledMetricAccum ( "c" , "m" , "n" , "d" , null ) ; long duration = 500 ; int delta = 4 ; int numberIncrements = 5 ; metric . add ( 0 ) ; for ( int x = 0 ; x < numberIncrements ; x +... | org . junit . Assert . assertEquals ( ( ( long ) ( delta * numberIncrements ) ) , metric . getValue ( ) ) |
testDoNotRefineOtherContext ( ) { org . eclipse . aether . graph . DependencyNode node = parseLiteral ( "gid:aid:cls:ver" ) ; node . setRequestContext ( "otherContext" ) ; org . eclipse . aether . graph . DependencyNode refinedNode = transform ( node ) ; "<AssertPlaceHolder>" ; } setRequestContext ( java . lang . Strin... | org . junit . Assert . assertEquals ( node , refinedNode ) |
testPublishToServerTask ( ) { org . pentaho . reporting . designer . extensions . pentaho . repository . actions . PublishToServerTask task = new org . pentaho . reporting . designer . extensions . pentaho . repository . actions . PublishToServerTask ( reportDesignerContext , uiContext ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( task ) |
testGetLabelResource ( ) { System . out . println ( "getLabelResource" ) ; kg . apc . jmeter . vizualizers . JMXMonGui instance = new kg . apc . jmeter . vizualizers . JMXMonGui ( ) ; java . lang . String result = instance . getLabelResource ( ) ; "<AssertPlaceHolder>" ; } getLabelResource ( ) { return this . getClass ... | org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) ) |
testInspectBasicField ( ) { java . lang . String entityName = "Customer" ; java . lang . String fieldName = "firstName" ; generateSimpleEntity ( entityName ) ; generateStringField ( fieldName ) ; org . jboss . forge . roaster . model . source . JavaClassSource klass = getJavaClassFor ( entityName ) ; java . util . List... | org . junit . Assert . assertThat ( inspectionResult , hasItemWithEntry ( "name" , fieldName ) ) |
testOrderBy ( ) { addDataStore ( ) ; addNamespace ( ) ; org . geoserver . catalog . FeatureTypeInfo ft1 = newFeatureType ( "s2" 3 , ds ) ; org . geoserver . catalog . FeatureTypeInfo ft2 = newFeatureType ( "ft2" , ds ) ; org . geoserver . catalog . FeatureTypeInfo ft3 = newFeatureType ( "ft3" , ds ) ; ft2 . getKeywords... | org . junit . Assert . assertEquals ( 3 , catalog . getLayers ( ) . size ( ) ) |
nextMTerminal ( ) { org . openscience . cdk . isomorphism . AbstractVFState state = create ( 5 , 10 ) ; state . size = 2 ; state . m2 [ 0 ] = 1 ; state . m2 [ 1 ] = 0 ; state . t1 [ 1 ] = 1 ; state . t2 [ 4 ] = 1 ; "<AssertPlaceHolder>" ; } nextM ( int , int ) { if ( ( size ) == 0 ) return m + 1 ; for ( int i = m + 1 ;... | org . junit . Assert . assertThat ( state . nextM ( 1 , ( - 1 ) ) , org . hamcrest . CoreMatchers . is ( 4 ) ) |
_3_A$ ( ) { java . lang . String _1 = "foo" ; java . lang . Integer _2 = 123 ; java . lang . Long _3 = 456L ; java . lang . Boolean _4 = false ; com . m3 . scalaflavor4j . Tuple4 < java . lang . String , java . lang . Integer , java . lang . Long , java . lang . Boolean > target = com . m3 . scalaflavor4j . Tuple4 . ap... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
testLoggerContextsListInitiallyEmpty ( ) { final org . apache . logging . log4j . core . async . AsyncLoggerContextSelector selector = new org . apache . logging . log4j . core . async . AsyncLoggerContextSelector ( ) ; "<AssertPlaceHolder>" ; } getLoggerContexts ( ) { final java . util . List < org . apache . logging ... | org . junit . Assert . assertTrue ( selector . getLoggerContexts ( ) . isEmpty ( ) ) |
testBigDecimalIds ( ) { ca . uhn . fhir . model . primitive . IdDt id = new ca . uhn . fhir . model . primitive . IdDt ( new java . math . BigDecimal ( "123" ) ) ; "<AssertPlaceHolder>" ; } getIdPartAsBigDecimal ( ) { return myId . getIdPartAsBigDecimal ( ) ; } | org . junit . Assert . assertEquals ( id . getIdPartAsBigDecimal ( ) , new java . math . BigDecimal ( "123" ) ) |
sliceTest ( ) { java . util . List < java . lang . String > list = list ( "apple" , "oranges" , "pears" , "grapes" , "kiwi" ) ; java . util . List < java . lang . String > list2 = slc ( list , 0 , 2 ) ; "<AssertPlaceHolder>" ; } list ( org . boon . core . Handler , java . lang . String ) { get ( responseHandler , key )... | org . junit . Assert . assertEquals ( list ( "apple" , "oranges" ) , list2 ) |
testGetCustomWorkspaceParentValue ( ) { java . lang . String parentWorkspace = "/tmp" ; hudson . matrix . MatrixProject parentProject = new hudson . matrix . MatrixProjectTest . MatrixProjectMock ( "parent" ) ; parentProject . setCustomWorkspace ( parentWorkspace ) ; hudson . matrix . MatrixProject childProject1 = new ... | org . junit . Assert . assertEquals ( childProject1 . getCustomWorkspace ( ) , parentWorkspace ) |
shouldIncludeAllCoveredLinesInCoverageSummary ( ) { final org . pitest . coverage . CoverageMother . BlockLocationBuilder block = org . pitest . coverage . CoverageMother . aBlockLocation ( ) ; when ( this . code . getCodeUnderTestNames ( ) ) . thenReturn ( java . util . Collections . singleton ( block . build ( ) . ge... | org . junit . Assert . assertEquals ( 4 , actual . getNumberOfCoveredLines ( ) ) |
testShowInputDialogs ( ) { org . evosuite . testsuite . TestSuiteChromosome suite = new org . evosuite . testsuite . TestSuiteChromosome ( ) ; org . evosuite . instrumentation . InstrumentingClassLoader cl = new org . evosuite . instrumentation . InstrumentingClassLoader ( ) ; org . evosuite . testcase . TestCase t1 = ... | org . junit . Assert . assertEquals ( 2 , coveredGoals . size ( ) ) |
testEmpty ( ) { when ( registry . isEmpty ( ) ) . thenReturn ( true ) ; boolean empty = tested . isEmpty ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return dayTimeValues ( ) . allMatch ( this :: isNone ) ; } | org . junit . Assert . assertTrue ( empty ) |
testOrderingEquals ( ) { org . teiid . query . sql . symbol . Expression ex = org . teiid . query . processor . TestFunctionResolving . getExpression ( "ST_OrderingEquals(ST_GeomFromText('LINESTRING(0<sp>0,<sp>10<sp>10)'),ST_GeomFromText('LINESTRING(0<sp>0,<sp>0<sp>0,<sp>10<sp>10)'))" ) ; "<AssertPlaceHolder>" ; } eval... | org . junit . Assert . assertFalse ( ( ( java . lang . Boolean ) ( org . teiid . query . eval . Evaluator . evaluate ( ex ) ) ) ) |
testBasicQuoted6 ( ) { final java . lang . String input = "a:\'b\'\"c\':d" ; final org . apache . commons . lang3 . text . StrTokenizer tok = new org . apache . commons . lang3 . text . StrTokenizer ( input , ':' ) ; tok . setQuoteMatcher ( org . apache . commons . lang3 . text . StrMatcher . quoteMatcher ( ) ) ; org .... | org . junit . Assert . assertFalse ( tok . hasNext ( ) ) |
testTimeout_readBuffer_Success2 ( ) { final byte [ ] exp = new byte [ ] { 'a' , 'b' , 'c' } ; final byte [ ] act = new byte [ exp . length ] ; out . write ( exp ) ; org . eclipse . jgit . util . IO . readFully ( is , act , 0 , 1 ) ; org . eclipse . jgit . util . IO . readFully ( is , act , 1 , 1 ) ; org . eclipse . jgi... | org . junit . Assert . assertArrayEquals ( exp , act ) |
testNodeChildrenCreatedSince ( ) { long start = java . lang . System . currentTimeMillis ( ) ; activity = createActivity ( ( "ActivityDescendantsCreatedSince-" + start ) ) ; java . util . List < com . ibm . sbt . services . client . connections . activities . ActivityNode > nodes = createActivityDescendants ( activity ... | org . junit . Assert . assertEquals ( 3 , activityNodes . size ( ) ) |
testBlasGemm3 ( ) { if ( org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . getClass ( ) . getSimpleName ( ) . toLowerCase ( ) . contains ( "cuda" ) ) return ; lombok . val A = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 9 , 9 , DataType . DOUBLE ) . reshape ( 'c' , 3 , 3 ) . dup ( 'f' ) ; lombok . v... | org . junit . Assert . assertEquals ( exp , res ) |
shouldSkipIpCheckForZeroThreshold ( ) { org . bukkit . entity . Player player = fr . xephi . authme . process . login . AsynchronousLoginTest . mockPlayer ( "Fiona" ) ; given ( commonService . getProperty ( RestrictionSettings . MAX_LOGIN_PER_IP ) ) . willReturn ( 0 ) ; boolean result = asynchronousLogin . hasReachedMa... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( false ) ) |
shouldAllowSavingOfLazyLoadedDbRefs ( ) { template . dropCollection ( org . springframework . data . mongodb . core . MongoTemplateTests . SomeTemplate . class ) ; template . dropCollection ( org . springframework . data . mongodb . core . MongoTemplateTests . SomeMessage . class ) ; template . dropCollection ( org . s... | org . junit . Assert . assertThat ( template . findById ( content . id , org . springframework . data . mongodb . core . MongoTemplateTests . SomeContent . class ) . getText ( ) , is ( "data" ) ) |
testSetCallerClassName ( ) { final org . bonitasoft . engine . queriablelogger . model . builder . SQueriableLogBuilder builder = fact . createNewInstance ( ) ; builder . callerClassName ( "RecorderImpl.class" ) . rawMessage ( "successfully<sp>executed" ) . severity ( SQueriableLogSeverity . BUSINESS ) ; builder . acti... | org . junit . Assert . assertEquals ( "RecorderImpl.class" , queriableLog . getCallerClassName ( ) ) |
testPriorityOnProcessStart ( ) { processInstance = runtimeService . startProcessInstanceByKey ( "serviceTaskProcess" ) ; org . camunda . bpm . engine . runtime . Job job = managementService . createJobQuery ( ) . singleResult ( ) ; "<AssertPlaceHolder>" ; } getPriority ( ) { return org . camunda . bpm . integrationtest... | org . junit . Assert . assertEquals ( PriorityBean . PRIORITY , job . getPriority ( ) ) |
testSerialization ( ) { org . jfree . chart . plot . MeterInterval m1 = new org . jfree . chart . plot . MeterInterval ( "X" , new org . jfree . data . Range ( 1.0 , 2.0 ) ) ; org . jfree . chart . plot . MeterInterval m2 = ( ( org . jfree . chart . plot . MeterInterval ) ( org . jfree . chart . TestUtils . serialised ... | org . junit . Assert . assertEquals ( m1 , m2 ) |
testEvaluateTwoIndexValidate ( ) { final org . eclipse . rdf4j . sail . Sail nonPcjSail = org . apache . rya . sail . config . RyaSailFactory . getInstance ( conf ) ; final org . apache . rya . mongodb . MongoDBRdfConfiguration pcjConf = conf . clone ( ) ; pcjConf . setBoolean ( ConfigUtils . USE_PCJ , true ) ; final o... | org . junit . Assert . assertTrue ( ipv . isValid ( te ) ) |
toJSON_ThemeSetWithRadialGradient_ThemeSerializedWithRadialGradient ( ) { com . vaadin . addon . charts . model . style . Theme theme = new com . vaadin . addon . charts . model . style . Theme ( ) ; theme . setColors ( com . vaadin . addon . charts . model . style . GradientColor . createRadial ( 1 , 2 , 3 ) ) ; optio... | org . junit . Assert . assertEquals ( expected , toJSON ( options ) ) |
testSupported ( ) { validator = new io . atlasmap . validators . StringPatternValidator ( io . atlasmap . v2 . ValidationScope . ALL , "Must<sp>match<sp>.*" , ".*" ) ; "<AssertPlaceHolder>" ; } supports ( java . lang . Class ) { return io . atlasmap . v2 . LookupTables . class . isAssignableFrom ( clazz ) ; } | org . junit . Assert . assertTrue ( validator . supports ( java . lang . String . class ) ) |
testAllOrNothingRequirements ( ) { req = new org . eclipse . tracecompass . tmf . core . analysis . requirements . TmfAnalysisEventFieldRequirement ( org . eclipse . tracecompass . tmf . core . tests . analysis . requirements . AnalysisEventFieldRequirementTest . EVENT1 , checkNotNull ( java . util . Collections . empt... | org . junit . Assert . assertTrue ( req . test ( trace ) ) |
testNoConflicts ( ) { org . eclipse . aether . graph . DependencyNode node = parseResource ( "no-conflicts.txt" ) ; "<AssertPlaceHolder>" ; expectOrder ( "gid:aid::jar" , "gid3:aid::jar" , "gid2:aid::jar" , "gid4:aid::jar" ) ; expectCycle ( false ) ; } parseResource ( java . lang . String ) { java . net . URL res = thi... | org . junit . Assert . assertSame ( node , transform ( node ) ) |
treeData_clear ( ) { data . clear ( ) ; "<AssertPlaceHolder>" ; } getChildren ( T ) { if ( ! ( contains ( item ) ) ) { throw new java . lang . IllegalArgumentException ( ( ( "Item<sp>'" + item ) + "'<sp>not<sp>in<sp>the<sp>hierarchy" ) ) ; } return java . util . Collections . unmodifiableList ( itemToWrapperMap . get (... | org . junit . Assert . assertTrue ( data . getChildren ( null ) . isEmpty ( ) ) |
testLeftReleased ( ) { worldController . leftReleased ( ) ; "<AssertPlaceHolder>" ; } leftReleased ( ) { keys . get ( keys . put ( com . rubentxu . juegos . core . controladores . WorldController . Keys . LEFT , false ) ) ; } | org . junit . Assert . assertFalse ( WorldController . keys . get ( WorldController . Keys . LEFT ) ) |
testModifyTicketWriteBytesLessThanZero ( ) { org . irods . jargon . ticket . packinstr . TicketAdminInp pi = org . irods . jargon . ticket . packinstr . TicketAdminInp . instanceForModifyByteWriteNumber ( "" , new java . lang . Integer ( ( - 100 ) ) ) ; "<AssertPlaceHolder>" ; } instanceForModifyByteWriteNumber ( java ... | org . junit . Assert . assertNotNull ( pi ) |
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = ne... | org . junit . Assert . assertTrue ( assetListEntries . isEmpty ( ) ) |
testObjNestedBraces ( ) { java . lang . String nestedBracesMsg = "\"request\":<sp>\"/Foo(${bar})\"" ; java . lang . String logMsg = ( "<sp>{" + nestedBracesMsg ) + "}<sp>" ; com . sap . hcp . cf . logging . common . converter . DefaultMessageConverter jmc = new com . sap . hcp . cf . logging . common . converter . Defa... | org . junit . Assert . assertThat ( formatMsg ( jmc , logMsg ) , org . hamcrest . core . Is . is ( nestedBracesMsg ) ) |
testCreateRuntime_Injection ( ) { io . bootique . BQRuntime runtime = testFactory . app ( "-x" ) . autoLoadModules ( ) . createRuntime ( ) ; "<AssertPlaceHolder>" ; } getArgs ( ) { return injector . getInstance ( com . google . inject . Key . get ( java . lang . String [ ] . class , io . bootique . annotation . Args . ... | org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "-x" } , runtime . getArgs ( ) ) |
ctrFloatFalse ( ) { float [ ] [ ] input = new float [ ] [ ] { new float [ ] { 1 , 4 } , new float [ ] { 2 , 5 } , new float [ ] { 3 , 6 } } ; org . smurn . jsift . Image target = new org . smurn . jsift . Image ( input , false ) ; float [ ] [ ] expected = new float [ ] [ ] { new float [ ] { 1 , 2 , 3 } , new float [ ] ... | org . junit . Assert . assertArrayEquals ( expected , target . toArray ( ) ) |
testParseExampleBug ( ) { edu . cornell . med . icb . goby . readers . vcf . VCFParser parser = new edu . cornell . med . icb . goby . readers . vcf . VCFParser ( "test-data/stats-writer/GT-bug-example-vcf" ) ; parser . readHeader ( ) ; edu . cornell . med . icb . goby . readers . vcf . Columns cols = parser . getColum... | org . junit . Assert . assertEquals ( "GT" , parser . getStringFieldValue ( formatGlobalFieldIndex ) ) |
testDistinctLazy ( ) { java . util . List < java . lang . Integer > input = new java . util . ArrayList < java . lang . Integer > ( 10 ) ; input . addAll ( java . util . Arrays . asList ( 1 , 1 , 2 , 3 , 5 ) ) ; com . annimon . stream . Stream < java . lang . Integer > stream = com . annimon . stream . Stream . of ( in... | org . junit . Assert . assertThat ( stream , elements ( org . hamcrest . Matchers . contains ( 1 , 2 , 3 , 5 , ( - 1 ) ) ) ) |
severalCaches ( ) { org . xwiki . cache . CacheFactory factory = getCacheFactory ( ) ; org . xwiki . cache . Cache < java . lang . Object > cache = factory . newCache ( new org . xwiki . cache . config . CacheConfiguration ( ) ) ; org . xwiki . cache . Cache < java . lang . Object > cache2 = factory . newCache ( new or... | org . junit . Assert . assertNull ( cache2 . get ( org . xwiki . cache . test . KEY ) ) |
testBetween ( ) { try { org . talend . dq . dbms . DbmsLanguage dbms = getMysqlDbmsLanguage ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } } between ( ) { return surroundWithSpaces ( SqlPredicate . BETWEEN . getLiteral ( ) ) ; } | org . junit . Assert . assertNotNull ( dbms . between ( ) ) |
bug3524734IsResolved ( ) { org . openscience . cdk . interfaces . IAtomContainer container = new org . openscience . cdk . silent . AtomContainer ( 10 , 9 , 0 , 0 ) ; container . addAtom ( org . openscience . cdk . forcefield . mmff . MmffAtomTypeMatcherTest . atom ( "H" , 0 ) ) ; container . addAtom ( org . openscienc... | org . junit . Assert . assertArrayEquals ( expected , actual ) |
testProvisioningError ( ) { io . fabric8 . api . Container container = createMock ( io . fabric8 . api . Container . class ) ; expect ( container . getId ( ) ) . andReturn ( "container" ) . anyTimes ( ) ; expect ( container . isAlive ( ) ) . andReturn ( true ) . anyTimes ( ) ; expect ( container . isManaged ( ) ) . and... | org . junit . Assert . assertFalse ( task . call ( ) ) |
maxDate ( ) { net . time4j . calendar . JapaneseCalendar max = net . time4j . PlainDate . axis ( ) . getMaximum ( ) . transform ( net . time4j . calendar . JapaneseCalendar . class ) ; "<AssertPlaceHolder>" ; try { net . time4j . calendar . JapaneseCalendar . axis ( ) . getCalendarSystem ( ) . transform ( ( ( max . get... | org . junit . Assert . assertThat ( max , org . hamcrest . CoreMatchers . is ( net . time4j . calendar . JapaneseCalendar . axis ( ) . getMaximum ( ) ) ) |
testUnicodeVariable1 ( ) { net . objecthunter . exp4j . Expression e = new net . objecthunter . exp4j . ExpressionBuilder ( "" ) . variable ( "" ) . build ( ) . setVariable ( "" , net . objecthunter . exp4j . E ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { final net . objecthunter . exp4j . ArrayStack output = new net .... | org . junit . Assert . assertEquals ( net . objecthunter . exp4j . E , e . evaluate ( ) , 0.0 ) |
compare_two_Dates_apachecommons ( ) { java . util . Calendar sinceGraduation = java . util . Calendar . getInstance ( ) ; sinceGraduation . set ( Calendar . YEAR , 1984 ) ; sinceGraduation . set ( Calendar . MONTH , 6 ) ; sinceGraduation . set ( Calendar . DAY_OF_MONTH , 4 ) ; java . util . Calendar today = java . util... | org . junit . Assert . assertTrue ( ( val <= 0 ) ) |
deveObterEventoRetornoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . NFEnviaEventoRetorno eventoRetorno = new com . fincatto . documentofiscal . nfe400 . classes . evento . NFEnviaEventoRetorno ( ) ; final java . util . ArrayList < com . fincatto . documentofiscal . nfe400 . cl... | org . junit . Assert . assertEquals ( eventosRetorno , eventoRetorno . getEventoRetorno ( ) ) |
testLoadedIssueThrowsException ( ) { issueslist . add ( new org . locationtech . udig . issues . AbstractIssue ( ) { public void fixIssue ( org . eclipse . ui . IViewPart part , org . eclipse . ui . IEditorPart editor ) { } public java . lang . String getExtensionID ( ) { return null ; } public java . lang . String get... | org . junit . Assert . assertTrue ( issueslist . isEmpty ( ) ) |
testConvertFrom ( ) { java . util . UUID uuid = java . util . UUID . randomUUID ( ) ; "<AssertPlaceHolder>" ; } convertFrom ( java . lang . String ) { return "Foobar" ; } | org . junit . Assert . assertEquals ( uuid , converter . convertFrom ( uuid . toString ( ) ) ) |
testSearchProvince ( ) { customer . setProvince ( "Ontario" ) ; data = manager . search ( ) ; "<AssertPlaceHolder>" ; } search ( ) { java . lang . String selectStatement = "select<sp>*<sp>from<sp>users<sp>where<sp>" ; int size = selectStatement . length ( ) ; values = new java . util . ArrayList < java . lang . Object ... | org . junit . Assert . assertTrue ( ( ( data . size ( ) ) == 2 ) ) |
testMultithreadWritable ( ) { sqlite . feature . async . BindDummy01DataSource ds = sqlite . feature . async . BindDummy01DataSource . getInstance ( ) ; ds . execute ( new sqlite . feature . async . BindDummy01DataSource . Transaction ( ) { @ sqlite . feature . async . Override public com . abubusoft . kripton . androi... | org . junit . Assert . assertTrue ( ( ( ( operations . get ( 0 ) ) == 2 ) && ( ( operations . get ( 1 ) ) == 1 ) ) ) |
testWhenSuspendedPartially ( ) { lease . setStatus ( LeaseStatus . SUSPENDED_PARTIALLY ) ; "<AssertPlaceHolder>" ; } disableTerminate ( ) { if ( ! ( ( getStatus ( ) . equals ( LeaseStatus . ACTIVE ) ) || ( getStatus ( ) . equals ( LeaseStatus . SUSPENDED_PARTIALLY ) ) ) ) { return "Status<sp>is<sp>not<sp>Active<sp>or<s... | org . junit . Assert . assertNull ( lease . disableTerminate ( ) ) |
testGetEbsBlockDeviceConfigsWhenInputListContainsNullElement ( ) { java . util . List < org . finra . herd . model . api . xml . EmrClusterDefinitionEbsBlockDeviceConfig > emrClusterDefinitionEbsBlockDeviceConfigs = new java . util . ArrayList ( ) ; emrClusterDefinitionEbsBlockDeviceConfigs . add ( null ) ; java . util... | org . junit . Assert . assertEquals ( new java . util . ArrayList ( ) , result ) |
testRemoveByIdNullKey ( ) { java . util . List < org . kaaproject . kaa . server . common . nosql . cassandra . dao . model . CassandraEndpointConfiguration > configs = generateConfiguration ( 3 ) ; org . kaaproject . kaa . server . common . nosql . cassandra . dao . model . CassandraEndpointConfiguration expected = co... | org . junit . Assert . assertEquals ( expected , found ) |
testAuditLoggingOffForInboundDS ( ) { oasis . names . tc . ebxml_regrep . xsd . rs . _3 . RegistryResponseType expectedResponse = new oasis . names . tc . ebxml_regrep . xsd . rs . _3 . RegistryResponseType ( ) ; gov . hhs . fha . nhinc . docsubmission . adapter . proxy . AdapterDocSubmissionProxy adapterProxy = mock (... | org . junit . Assert . assertSame ( expectedResponse , actualResponse ) |
testCreateSingleValue ( ) { final java . lang . Object result = propertyIndex . createSingleValue ( "12" ) ; "<AssertPlaceHolder>" ; } createSingleValue ( java . lang . Object [ ] ) { return com . orientechnologies . orient . core . metadata . schema . OType . convert ( param [ 0 ] , keyType . getDefaultJavaType ( ) ) ... | org . junit . Assert . assertEquals ( result , 12 ) |
test_Lang58 ( ) { if ( ! ( fr . inria . lille . repair . nopol . Defects4jUtils . testShouldBeRun ( ) ) ) { return ; } nopolContext . setComplianceLevel ( 4 ) ; fr . inria . lille . repair . nopol . NopolResult result = new fr . inria . lille . repair . nopol . NoPol ( nopolContext ) . build ( ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertEquals ( 1 , result . getPatches ( ) . size ( ) ) |
testMissingUsersAndGroups ( ) { final org . apache . nifi . authorization . AccessPolicy policy = new org . apache . nifi . authorization . AccessPolicy . Builder ( ) . identifier ( "1" ) . resource ( org . apache . nifi . authorization . TestAccessPolicy . TEST_RESOURCE ) . action ( RequestAction . READ ) . build ( ) ... | org . junit . Assert . assertNotNull ( policy ) |
test57updateXAuditMapNull ( ) { org . apache . ranger . view . VXAuditMap testvXAuditMap = createVXAuditMapObj ( ) ; org . mockito . Mockito . when ( restErrorUtil . createRESTException ( org . mockito . Mockito . anyString ( ) , ( ( org . apache . ranger . common . MessageEnums ) ( org . mockito . Mockito . any ( ) ) ... | org . junit . Assert . assertNull ( retvXAuditMap ) |
whenOpenTransaction_SchemaConceptCacheIsEmpty ( ) { grakn . core . server . session . cache . TransactionCache transactionCache = tx . cache ( ) ; java . util . Map < grakn . core . concept . Label , grakn . core . concept . type . SchemaConcept > schemaConceptCache = transactionCache . getSchemaConceptCache ( ) ; "<As... | org . junit . Assert . assertEquals ( 0 , schemaConceptCache . size ( ) ) |
testAcceptValidParameter2 ( ) { final org . openspotlight . graph . query . console . ConsoleState state = new org . openspotlight . graph . query . console . ConsoleState ( null ) ; state . setInput ( "remove<sp>property<sp>?" ) ; "<AssertPlaceHolder>" ; } accept ( org . openspotlight . graph . query . console . Conso... | org . junit . Assert . assertThat ( command . accept ( state ) , org . hamcrest . core . Is . is ( true ) ) |
testLegitimateSingletonCollection ( ) { class Struct { private org . scijava . util . ConversionUtilsTest . ListWrapper listWrapper ; } final Struct struct = new Struct ( ) ; setFieldValue ( struct , "listWrapper" , java . util . Arrays . asList ( 4 , 8 , 2 ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( struct . listWrapper ) |
test_getKeysForQuery_withFilter ( ) { com . google . common . collect . SetMultimap < java . lang . String , java . lang . String > tagFilter = com . google . common . collect . HashMultimap . create ( ) ; tagFilter . put ( "client" , "bar" ) ; org . kairosdb . datastore . cassandra . DatastoreMetricQuery query = new o... | org . junit . Assert . assertEquals ( 2 , keys . size ( ) ) |
testMatchesIdenticalVersion ( ) { com . eclipsesource . tabris . internal . DefaultVersionCheck versionCheck = new com . eclipsesource . tabris . internal . DefaultVersionCheck ( ) ; boolean matches = versionCheck . accept ( "1.3.0" , "1.3.0" ) ; "<AssertPlaceHolder>" ; } accept ( java . lang . String , java . lang . S... | org . junit . Assert . assertTrue ( matches ) |
canBeUpToSixDaysInPast ( ) { final org . joda . time . LocalDate sixDaysAgo = org . apache . isis . applib . clock . Clock . getTimeAsLocalDate ( ) . plusDays ( ( - 6 ) ) ; toDoItem . setDueBy ( sixDaysAgo ) ; "<AssertPlaceHolder>" ; } getDueBy ( ) { return dueBy ; } | org . junit . Assert . assertThat ( toDoItem . getDueBy ( ) , org . hamcrest . CoreMatchers . is ( sixDaysAgo ) ) |
testIgnoreOldActions ( ) { org . netbeans . modules . uihandler . SlownessReporter reporter = new org . netbeans . modules . uihandler . SlownessReporter ( ) ; java . lang . String latestAction = reporter . getLatestAction ( 10L , ( ( now ) + ( ( SlownessReporter . LATEST_ACTION_LIMIT ) * 2 ) ) ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertNull ( latestAction ) |
testGetURI ( ) { org . geoserver . catalog . NamespaceInfo ns = createMock ( org . geoserver . catalog . NamespaceInfo . class ) ; expect ( ns . getURI ( ) ) . andReturn ( "http://foo.org" ) ; org . geoserver . catalog . Catalog cat = createMock ( org . geoserver . catalog . Catalog . class ) ; expect ( cat . getNamesp... | org . junit . Assert . assertEquals ( "http://foo.org" , nsSupport . getURI ( "foo" ) ) |
testCompareToPosPos2 ( ) { byte [ ] aBytes = new byte [ ] { 10 , 20 , 30 , 40 , 50 , 60 , 70 , 10 , 20 , 30 } ; byte [ ] bBytes = new byte [ ] { 12 , 56 , 100 , - 2 , - 76 , 89 , 45 , 91 , 3 , - 15 , 35 , 26 , 3 , 91 } ; int aSign = 1 ; int bSign = 1 ; java . math . BigInteger aNumber = new java . math . BigInteger ( a... | org . junit . Assert . assertEquals ( ( - 1 ) , aNumber . compareTo ( bNumber ) ) |
testSave ( ) { java . util . List < com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . IndexRangeKeyClass > objs = new java . util . ArrayList < com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . IndexRangeKeyClass > ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { com . amazonaws . mobileconnec... | org . junit . Assert . assertEquals ( obj , loaded ) |
testEncodePost ( ) { java . lang . String POST_CORRECT = "openid.mode:associate\n" + "openid.ns:http://specs.openid.net/auth/2.0" ; java . lang . StringBuilder sb = encoder . encode ( message , EncodingMode . POST_STRING , null ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder sb = new java . lan... | org . junit . Assert . assertEquals ( POST_CORRECT , sb . toString ( ) ) |
addObjectDeleteActions_whenObjectIsATableWithCascadeOption_thenTableDropActionWithCascadeOptionIsReturned ( ) { org . jkiss . dbeaver . model . impl . edit . SQLDatabasePersistAction regularTableDropTableQuery = new org . jkiss . dbeaver . model . impl . edit . SQLDatabasePersistAction ( "Drop<sp>table" , "DROP<sp>TABL... | org . junit . Assert . assertEquals ( regularTableDropTableQuery . getScript ( ) , sqlDatabasePersistAction . getScript ( ) ) |
shouldCallAllHandlers ( ) { java . lang . String thingToHandle = "Something" ; given ( handler1 . handle ( thingToHandle ) ) . willReturn ( "value1" ) ; given ( handler2 . handle ( thingToHandle ) ) . willReturn ( "value2" ) ; java . lang . String [ ] strings = manager . handle ( thingToHandle ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "value1" , "value2" } , strings ) |
testConvertWithNoRelations ( ) { java . lang . String abbrName = "abbr<sp>name" ; java . lang . String name = "name" ; java . lang . Integer isTesting = 1 ; org . lnu . is . resource . enrolment . subject . EnrolmentSubjectResource source = new org . lnu . is . resource . enrolment . subject . EnrolmentSubjectResource ... | org . junit . Assert . assertEquals ( expected , actual ) |
txn_read_promote_commit ( ) { unit . begin ( TxnType . READ ) ; boolean b = unit . promote ( ) ; "<AssertPlaceHolder>" ; unit . end ( ) ; checkClear ( ) ; } promote ( ) { if ( bpTree . getNodeManager ( ) . isWritable ( this . getId ( ) ) ) return false ; boolean promoteInPlace = bpTree . state ( ) . modifiableNodeBlock... | org . junit . Assert . assertFalse ( b ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.