input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
shouldBeAbleToCreateAWebDriverBackedSeleniumInstance ( ) { java . net . URL wdServer = new java . net . URL ( java . lang . String . format ( "http://%s:%d/wd/hub" , com . thoughtworks . selenium . StartTest . url . getHost ( ) , com . thoughtworks . selenium . StartTest . url . getPort ( ) ) ) ; org . openqa . seleniu... | org . junit . Assert . assertEquals ( title , seleniumTitle ) |
testEmptyFolderCommittedDeletedCommittedComparedWithInitialCommit ( ) { org . eclipse . jgit . revwalk . RevCommit commit = createEmptyFolderAndCommit ( ) ; deleteFolderAndCommit ( ) ; org . eclipse . jgit . treewalk . TreeWalk treeWalk = createTreeWalk ( commit ) ; "<AssertPlaceHolder>" ; } next ( ) { org . eclipse . ... | org . junit . Assert . assertFalse ( treeWalk . next ( ) ) |
iterateSingleBatch ( ) { levelDBAliasMapServer . setConf ( conf ) ; levelDBAliasMapServer . start ( ) ; inMemoryLevelDBAliasMapClient . setConf ( conf ) ; org . apache . hadoop . hdfs . protocol . Block block1 = new org . apache . hadoop . hdfs . protocol . Block ( 42 , 43 , 44 ) ; org . apache . hadoop . hdfs . protoc... | org . junit . Assert . assertArrayEquals ( new org . apache . hadoop . hdfs . server . common . FileRegion [ ] { new org . apache . hadoop . hdfs . server . common . FileRegion ( block1 , providedStorageLocation1 ) , new org . apache . hadoop . hdfs . server . common . FileRegion ( block2 , providedStorageLocation2 ) }... |
testSendMessagesIncludeFields ( ) { info . novatec . testit . livingdoc . reflect . Message send = fixture . send ( "field" ) ; send . send ( "value" ) ; "<AssertPlaceHolder>" ; } send ( java . lang . String [ ] ) { assertArgumentsCount ( args ) ; ognlExpression . insertValue ( args [ 0 ] ) ; return null ; } | org . junit . Assert . assertEquals ( "value" , target . field ) |
readHeartbeatMessage ( ) { cocaine . message . Message msg = cocaine . message . Messages . heartbeat ( ) ; byte [ ] bytes = pack . write ( java . util . Arrays . asList ( 1 , 0 , java . util . Arrays . asList ( ) ) ) ; cocaine . message . Message result = pack . read ( bytes , cocaine . msgpack . MessageTemplate . get... | org . junit . Assert . assertEquals ( msg , result ) |
a_negative_value_should_be_returned_positive ( ) { int value = fr . inria . lille . examples . bool . constant . Neg . neg ( ( - 1 ) ) ; "<AssertPlaceHolder>" ; } neg ( int ) { if ( value < 0 ) { return ( - 1 ) * value ; } else { return value ; } } | org . junit . Assert . assertEquals ( 1 , value ) |
testIsCheckerDisabledWhenUnsettingRequiredUserGroupToUser ( ) { long requiredUserGroupId = addRequiredUserGroups ( ) [ 0 ] ; com . liferay . portal . kernel . model . UserGroup requiredUserGroup = com . liferay . portal . kernel . service . UserGroupLocalServiceUtil . getUserGroup ( requiredUserGroupId ) ; com . lifera... | org . junit . Assert . assertTrue ( setUserUserGroupChecker . isDisabled ( user ) ) |
testYieldLine11 ( ) { java . util . List < java . lang . Integer > result = forComp ( i , range ) . yield ( ( ) -> ( i . val ( ) ) + 1 ) ; "<AssertPlaceHolder>" ; } val ( ) { if ( ( holder ) != null ) { return ( ( T ) ( holder . val ( ) ) ) ; } if ( ( optionalHolder ) != null ) { return ( ( T ) ( optionalHolder . val (... | org . junit . Assert . assertEquals ( List ( 2 , 3 , 4 , 5 , 6 ) , result ) |
testIsMatch ( ) { "<AssertPlaceHolder>" ; } isMatch ( ) { if ( ( ( generalSituation ) == null ) || ( ( personalSituation ) == null ) ) return false ; return ( ( generalSituation . isFirstRound ( ) ) && ( ! ( personalSituation . isTsumo ( ) ) ) ) && ( ! ( personalSituation . isParent ( ) ) ) ; } | org . junit . Assert . assertTrue ( resolver . isMatch ( ) ) |
testGetModelListInjectList ( ) { java . util . List < com . dspot . declex . test . model . usemodel . model . ModelUser_ > listModelUser = com . dspot . declex . test . model . usemodel . model . ModelUser_ . getModelList_ ( RuntimeEnvironment . application , null , null ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( listModelUser ) |
testUnknownPlacementException ( ) { when ( _server . get ( "table-name" , "row-key" , ReadConsistency . STRONG ) ) . thenThrow ( new com . bazaarvoice . emodb . sor . api . UnknownPlacementException ( "Table<sp>table-name<sp>is<sp>not<sp>available<sp>in<sp>this<sp>data<sp>center" , "placement-name" ) ) ; try { sorClien... | org . junit . Assert . assertEquals ( e . getPlacement ( ) , "placement-name" ) |
testErodingObjectPoolDefaultFactor ( ) { try ( @ org . apache . commons . pool2 . SuppressWarnings ( "unchecked" ) final org . apache . commons . pool2 . ObjectPool < java . lang . Object > internalPool = org . apache . commons . pool2 . TestPoolUtils . createProxy ( org . apache . commons . pool2 . ObjectPool . class ... | org . junit . Assert . assertEquals ( expectedToString , pool . toString ( ) ) |
validate_shouldPassIfAllFieldsAreCorrectForANewOrderType ( ) { org . openmrs . OrderType orderType = new org . openmrs . OrderType ( ) ; orderType . setName ( "unique<sp>name" ) ; orderType . setJavaClassName ( "org.openmrs.TestDrugOrder" ) ; java . util . Collection < org . openmrs . ConceptClass > col = new java . ut... | org . junit . Assert . assertFalse ( errors . hasErrors ( ) ) |
test_now_ZoneId ( ) { java . time . ZoneId zone = java . time . ZoneId . of ( "Asia/Tokyo" ) ; org . threeten . extra . DayOfMonth test = org . threeten . extra . DayOfMonth . now ( zone ) ; if ( ( java . time . LocalDate . now ( zone ) . getDayOfMonth ( ) ) != ( test . getValue ( ) ) ) { test = org . threeten . extra ... | org . junit . Assert . assertEquals ( java . time . LocalDate . now ( zone ) . getDayOfMonth ( ) , test . getValue ( ) ) |
getPositionsByIdShouldReturnAListOfPositionsWhenThereArePositionsWithTheGivenId ( ) { java . util . List < java . lang . Long > ids = java . util . Arrays . asList ( com . epam . rft . atsy . service . impl . PositionServiceImplTest . DEVELOPER_ID , com . epam . rft . atsy . service . impl . PositionServiceImplTest . D... | org . junit . Assert . assertEquals ( actualPositionDtoList , expectedPositionDtoList ) |
testFromW2V ( ) { org . deeplearning4j . models . embeddings . loader . VectorsConfiguration configuration = new org . deeplearning4j . models . embeddings . loader . VectorsConfiguration ( ) ; configuration . setHugeModelExpected ( true ) ; configuration . setWindow ( 5 ) ; configuration . setIterations ( 3 ) ; config... | org . junit . Assert . assertEquals ( configuration , configuration2 ) |
testStop ( ) { when ( playerProperties . getStop ( ) ) . thenCallRealMethod ( ) ; mpdPlayer . stop ( ) ; verify ( commandExecutor ) . sendCommand ( stringArgumentCaptor . capture ( ) ) ; "<AssertPlaceHolder>" ; } getStop ( ) { return getPropertyString ( org . bff . javampd . player . PlayerProperties . Command . STOP .... | org . junit . Assert . assertEquals ( playerProperties . getStop ( ) , stringArgumentCaptor . getValue ( ) ) |
shouldSetValueOnMutableObjectWhenFound ( ) { this . readOnly = Boolean . FALSE ; this . resolver . setValue ( this . elContext , null , org . springframework . springfaces . expression . el . AbstrctELResolverTest . PROPERTY_NAME , org . springframework . springfaces . expression . el . AbstrctELResolverTest . REPLACED... | org . junit . Assert . assertThat ( this . map . get ( org . springframework . springfaces . expression . el . AbstrctELResolverTest . PROPERTY_NAME ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( org . springframework . springfaces . expression . el . AbstrctELResolverTest . REPLACED_PROPERT... |
assertGetUpdateCountSelect ( ) { for ( java . sql . Statement each : statements . values ( ) ) { each . execute ( sql ) ; "<AssertPlaceHolder>" ; } } getUpdateCount ( ) { if ( isAccumulate ( ) ) { return accumulate ( ) ; } else { java . util . Collection < ? extends java . sql . Statement > statements = getRoutedStatem... | org . junit . Assert . assertThat ( each . getUpdateCount ( ) , org . hamcrest . CoreMatchers . is ( ( - 1 ) ) ) |
shouldGiveErrorsIfInvalidDetailGlcode ( ) { chartOfAccount1 . setClassification ( 1L ) ; errors = billService . validateBillRegister ( billRegister ) ; "<AssertPlaceHolder>" ; } size ( ) { return messages . size ( ) ; } | org . junit . Assert . assertEquals ( 3 , errors . size ( ) ) |
testCreateSection ( ) { org . bukkit . configuration . ConfigurationSection section = getConfigurationSection ( ) ; org . bukkit . configuration . ConfigurationSection subsection = section . createSection ( "subsection" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( "subsection" , subsection . getName ( ) ) |
testCPUNumber ( ) { "<AssertPlaceHolder>" ; } getCPUCount ( ) { try { java . lang . String [ ] fileData = com . emc . storageos . systemservices . impl . healthmonitor . FileReadUtil . readLines ( com . emc . storageos . systemservices . impl . healthmonitor . CPU_INFO ) ; int ncpu = 0 ; for ( java . lang . String line... | org . junit . Assert . assertTrue ( ( ( com . emc . storageos . systemservices . impl . healthmonitor . ProcStats . getCPUCount ( ) ) > 0 ) ) |
testDetectConfigurationString ( ) { com . typesafe . config . Config config = com . typesafe . config . ConfigFactory . load ( "componentTest" ) ; org . powermock . api . mockito . PowerMockito . mockStatic ( org . apache . streams . config . StreamsConfigurator . class ) ; org . powermock . api . mockito . PowerMockit... | org . junit . Assert . assertEquals ( configuredPojo , testPojo ) |
testDrill4530_1 ( ) { test ( "refresh<sp>table<sp>metadata<sp>dfs.`%s`" , org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_2 ) ; checkForMetadataFile ( org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_2 ) ; java . lang . String query1 = java . la... | org . junit . Assert . assertEquals ( expectedRowCount , actualRowCount ) |
testGetMappingById ( ) { com . ocpsoft . pretty . faces . config . mapping . UrlMapping mapping2 = com . ocpsoft . pretty . faces . config . PrettyConfigTest . config . getMappingById ( "testid" ) ; "<AssertPlaceHolder>" ; } getMappingById ( java . lang . String ) { if ( id != null ) { if ( id . startsWith ( PrettyCont... | org . junit . Assert . assertEquals ( com . ocpsoft . pretty . faces . config . PrettyConfigTest . mapping , mapping2 ) |
getAttachmentWithNullFilename ( ) { "<AssertPlaceHolder>" ; } getAttachment ( java . lang . String ) { com . xpn . xwiki . doc . XWikiAttachment output = this . attachmentList . getByFilename ( filename ) ; if ( output != null ) { return output ; } for ( com . xpn . xwiki . doc . XWikiAttachment attach : getAttachmentL... | org . junit . Assert . assertNull ( this . document . getAttachment ( null ) ) |
emptyString ( ) { "<AssertPlaceHolder>" ; } emptyString ( ) { org . junit . Assert . assertEquals ( "" , com . zuoxiaolong . niubi . job . core . helper . StringHelper . emptyString ( ) ) ; } | org . junit . Assert . assertEquals ( "" , com . zuoxiaolong . niubi . job . core . helper . StringHelper . emptyString ( ) ) |
fakeTestMethod ( ) { "<AssertPlaceHolder>" ; server . stop ( ) ; } wasCalled ( ) { return wasCalled ; } | org . junit . Assert . assertTrue ( server . wasCalled ( ) ) |
testNumberOfFeaturesParsed ( ) { java . util . List < cucumber . runtime . model . CucumberFeature > features = new java . util . ArrayList < cucumber . runtime . model . CucumberFeature > ( ) ; try ( minium . cucumber . data . MiniumFeatureBuilder builder = new minium . cucumber . data . MiniumFeatureBuilder ( feature... | org . junit . Assert . assertEquals ( 1 , features . size ( ) ) |
testFromIdentifierPathComponentWithNullArgument ( ) { "<AssertPlaceHolder>" ; } fromIdentifierPathComponent ( java . lang . String ) { if ( pathComponent != null ) { final java . lang . String decodedComponent = edu . illinois . library . cantaloupe . http . Reference . decode ( pathComponent ) ; final java . util . re... | org . junit . Assert . assertNull ( edu . illinois . library . cantaloupe . image . ScaleConstraint . fromIdentifierPathComponent ( null ) ) |
testGoodExpressions ( ) { int count = 1 ; for ( final org . apache . commons . lang3 . tuple . Pair < java . lang . String , java . lang . String > pair : org . apache . rya . mongodb . document . util . DocumentVisibilityUtilTest . INPUT_AND_EXPECTED_BOOLEAN_EXPRESSIONS ) { final java . lang . String booleanExpression... | org . junit . Assert . assertEquals ( expected , booleanStringResult ) |
testGet ( ) { java . lang . String back = proxyServiceDirectCall . hellworld ( "123" ) ; "<AssertPlaceHolder>" ; } hellworld ( java . lang . String ) { return input ; } | org . junit . Assert . assertThat ( back , org . hamcrest . Matchers . is ( "123" ) ) |
testInInOnlyExchange ( ) { org . apache . camel . Exchange exchange = producerTemplate . send ( new org . apache . camel . Processor ( ) { public void process ( org . apache . camel . Exchange exchange ) throws org . apache . camel . component . exec . Exception { exchange . setPattern ( ExchangePattern . InOnly ) ; ex... | org . junit . Assert . assertNotNull ( result ) |
testIsNotAdmin ( ) { boolean isAdminChk = rangerBizUtil . isAdmin ( ) ; "<AssertPlaceHolder>" ; } isAdmin ( ) { org . apache . ranger . common . UserSessionBase currentUserSession = org . apache . ranger . common . ContextUtil . getCurrentUserSession ( ) ; if ( currentUserSession == null ) { org . apache . ranger . biz... | org . junit . Assert . assertFalse ( isAdminChk ) |
testMaxRows ( ) { init ( false ) ; org . eclipse . birt . data . engine . api . IQueryDefinition rqDefn = getReportQueryDefn ( org . eclipse . birt . data . engine . api . ScriptedDSTest . TEST_MAXROW ) ; org . eclipse . birt . data . engine . api . IPreparedQuery pq = dataEngine . prepare ( rqDefn ) ; org . eclipse . ... | org . junit . Assert . assertEquals ( rqDefn . getMaxRows ( ) , rowCount ) |
should_export_full_node ( ) { au . edu . wehi . idsv . visualisation . PositionalExporter . exportNodeDot ( output , 4 , com . google . common . collect . ImmutableList . of ( new au . edu . wehi . idsv . debruijn . positional . KmerPathNode ( 0 , 1 , 2 , false , 3 ) ) , null ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( output . exists ( ) ) |
getUniqueUserIdWithValidUser ( ) { java . lang . String user = "vmmtestuser" ; java . lang . String uniqueUserId = "CN=vmmtestuser,cn=users,dc=secfvt2,dc=austin,dc=ibm,dc=com" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . FATTestADwithSSL . c , "getUn... | org . junit . Assert . assertEquals ( uniqueUserId , com . ibm . ws . security . wim . adapter . ldap . fat . FATTestADwithSSL . servlet . getUniqueUserId ( user ) ) |
whenSaturatedPowTwoLongValues_shouldPowThemAndReturnIntMaxIfOverflow ( ) { long result = com . google . common . math . LongMath . saturatedPow ( Long . MAX_VALUE , 2 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( Long . MAX_VALUE , result ) |
testTableNameResolver ( ) { final java . lang . String REAL_TABLE_NAME = "aws-java-sdk-util" ; com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . DynamoDBMapper mapper = new com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . DynamoDBMapper ( dynamo ) ; final com . amazonaws . mobileconne... | org . junit . Assert . assertEquals ( loaded , obj ) |
shouldReturnTrueIfASimilarButNotResourceTypeRestrictedUserRestrictionExists ( ) { ch . puzzle . itc . mobiliar . business . security . control . UserRestrictionEntity userRestrictionEntity = new ch . puzzle . itc . mobiliar . business . security . control . UserRestrictionEntity ( ) ; userRestrictionEntity . setName ( ... | org . junit . Assert . assertTrue ( exists ) |
testMaxBP ( ) { if in_i == out ( == max ( in ) ) otherwise for ( boolean keepDims : new boolean [ ] { false , true } ) { org . nd4j . linalg . api . ndarray . INDArray preReduceInput = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 12 , 12 ) . reshape ( 3 , 4 ) ; preReduceInput . putScalar ( new int [ ] { 2 , 2 ... | org . junit . Assert . assertNull ( err ) |
testGetCapitalizedName11 ( ) { java . lang . String input = "xSameAsY" ; java . lang . String output = com . jmethods . catatumbo . impl . IntrospectionUtils . getCapitalizedName ( input ) ; com . jmethods . catatumbo . impl . IntrospectionUtilsTest . LOGGER . info ( ( ( input + "-->" ) + output ) ) ; "<AssertPlaceHold... | org . junit . Assert . assertEquals ( "xSameAsY" , output ) |
testTIKA2237 ( ) { org . apache . tika . metadata . Metadata metadata = new org . apache . tika . metadata . Metadata ( ) ; metadata . add ( Metadata . CONTENT_TYPE , org . apache . tika . mime . MediaType . text ( "javascript" ) . toString ( ) ) ; java . io . InputStream input = new java . io . ByteArrayInputStream ( ... | org . junit . Assert . assertEquals ( org . apache . tika . mime . MediaType . application ( "javascript" ) , detect ) |
plaintextRemoveHeaders ( ) { gov . uspto . patent . doc . xml . FormattedText format = new gov . uspto . patent . doc . xml . FormattedText ( ) ; java . lang . StringBuilder stb = new java . lang . StringBuilder ( ) ; stb . append ( "<p<sp>id=\"h-1\">SECTION<sp>TITLE</p>" ) ; stb . append ( "<p>Section<sp>Text<sp>here<... | org . junit . Assert . assertEquals ( expect , actual ) |
testGetVersionCode ( ) { soot . jimple . infoflow . android . manifest . ProcessManifest manifest = null ; try { manifest = new soot . jimple . infoflow . android . manifest . ProcessManifest ( "testAPKs/enriched1.apk" ) ; } catch ( java . io . IOException | org . xmlpull . v1 . XmlPullParserException e ) { e . printSt... | org . junit . Assert . assertFalse ( throwsException ) |
testReadWithQuery ( ) { java . lang . String query = "{_id:<sp>\"17\"}" ; java . util . List < org . apache . uima . jcas . JCas > l = ch . epfl . bbp . uima . BlueCasUtil . asList ( createReader ( ch . epfl . bbp . uima . mongo . MongoCollectionReader . class , BlueUima . PARAM_DB_CONNECTION , ch . epfl . bbp . uima .... | org . junit . Assert . assertEquals ( 1 , l . size ( ) ) |
moveTableToNonExistentDb ( ) { java . lang . String tableName = "doomedToWander" ; new org . apache . hadoop . hive . metastore . client . builder . TableBuilder ( ) . setTableName ( tableName ) . addCol ( "a" , "int" ) . create ( client , org . apache . hadoop . hive . metastore . tools . schematool . TestSchemaToolCa... | org . junit . Assert . assertTrue ( tableNames . contains ( tableName . toLowerCase ( ) ) ) |
updatePerson_shouldGenerateNewOmrsPerson ( ) { java . lang . String personUuid = "dagh524f-27ce-4bb2-86d6-6d1d05312bd5" ; org . hl7 . fhir . dstu3 . model . org . openmrs . Person person = org . openmrs . api . context . Context . getPersonService ( ) . getPersonByUuid ( personUuid ) ; clearExitingUuid ( person ) ; org... | org . junit . Assert . assertNotNull ( retrievedPerson ) |
collapseConsecutiveWhiteSpacesTabWhiteSpaceTest ( ) { java . lang . String toCollapse = "\t<sp>A<sp>B<sp>\t" ; java . lang . String actual = com . itextpdf . styledxmlparser . util . WhiteSpaceUtil . collapseConsecutiveSpaces ( toCollapse ) ; java . lang . String expected = "<sp>A<sp>B<sp>" ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertEquals ( expected , actual ) |
testType ( ) { org . apache . tajo . datum . Datum d = org . apache . tajo . datum . DatumFactory . createTime ( org . apache . tajo . datum . TestTimeDatum . TIME ) ; "<AssertPlaceHolder>" ; } type ( ) { return this . type ; } | org . junit . Assert . assertEquals ( Type . TIME , d . type ( ) ) |
notRetriableExitsFifty ( ) { final com . spotify . flo . Task < java . lang . String > task = com . spotify . flo . Task . named ( "task" ) . ofType ( java . lang . String . class ) . process ( ( ) -> { throw new com . spotify . flo . status . NotRetriable ( ) ; } ) ; java . util . concurrent . atomic . AtomicInteger s... | org . junit . Assert . assertThat ( status . get ( ) , org . hamcrest . CoreMatchers . is ( 50 ) ) |
deserializeSpecialTypes ( ) { final java . util . LinkedHashMap < java . lang . String , java . lang . Object > inputs = new java . util . LinkedHashMap ( ) ; final net . imglib2 . type . numeric . integer . ByteType type = new net . imglib2 . type . numeric . integer . ByteType ( ) ; final net . imglib2 . img . Img < ... | org . junit . Assert . assertEquals ( deserialized , inputs ) |
testIsAvailable ( ) { "<AssertPlaceHolder>" ; } isAvailable ( ) { return ( io . netty . channel . epoll . Epoll . UNAVAILABILITY_CAUSE ) == null ; } | org . junit . Assert . assertTrue ( io . netty . channel . epoll . Epoll . isAvailable ( ) ) |
shouldGetViewArtifactFromUrl ( ) { org . springframework . springfaces . mvc . servlet . view . FacesView view = new org . springframework . springfaces . mvc . servlet . view . FacesView ( ) ; view . setUrl ( "artifact" ) ; "<AssertPlaceHolder>" ; } getViewArtifact ( ) { return new org . springframework . springfaces ... | org . junit . Assert . assertThat ( view . getViewArtifact ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( new org . springframework . springfaces . mvc . render . ViewArtifact ( "artifact" ) ) ) ) |
testMetaMoveDuringClientZkClusterRestart ( ) { org . apache . hadoop . hbase . TableName tn = org . apache . hadoop . hbase . TableName . valueOf ( name . getMethodName ( ) ) ; org . apache . hadoop . hbase . client . ClusterConnection conn = ( ( org . apache . hadoop . hbase . client . ClusterConnection ) ( org . apac... | org . junit . Assert . assertArrayEquals ( value , result . getValue ( family , qualifier ) ) |
testAddition ( ) { double var1 = 1.0 ; org . evosuite . symbolic . expr . fp . RealVariable realVar1 = new org . evosuite . symbolic . expr . fp . RealVariable ( "test1" , var1 , Double . MIN_VALUE , Double . MAX_VALUE ) ; java . util . List < org . evosuite . symbolic . expr . Constraint < ? > > constraints = new java... | org . junit . Assert . assertNotNull ( result ) |
deveObterExtipiComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemProduto produto = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemProduto ( ) ; final java . lang . String extipi = "999" ; produto . setExtipi ( extipi ) ; "<AssertPlaceHol... | org . junit . Assert . assertEquals ( extipi , produto . getExtipi ( ) ) |
should_set_access_token_in_the_session ( ) { final org . kohsuke . stapler . StaplerRequest request = mock ( org . kohsuke . stapler . StaplerRequest . class ) ; final javax . servlet . http . HttpSession httpSession = mock ( javax . servlet . http . HttpSession . class ) ; when ( request . getSession ( ) ) . thenRetur... | org . junit . Assert . assertNotNull ( response ) |
testModuleDescriptorValidationFails ( ) { validator . validate ( capabilityDescriptor , errors ) ; "<AssertPlaceHolder>" ; printFieldErrors ( validator . getErrors ( ) ) ; } hasErrors ( ) { return hasErrors ; } | org . junit . Assert . assertTrue ( validator . hasErrors ( ) ) |
testLayoutDefinitionExport ( ) { org . nuxeo . ecm . platform . forms . layout . api . LayoutDefinition layoutDef = service . getLayoutDefinition ( WebLayoutManager . JSF_CATEGORY , "dublincore" ) ; "<AssertPlaceHolder>" ; check ( layoutDef , "en" ) ; check ( layoutDef , "fr" ) ; check ( layoutDef , null ) ; } getLayou... | org . junit . Assert . assertNotNull ( layoutDef ) |
givenUsernamePasswordProvider_whenCheckingAuthorized_thenSuccess ( ) { com . baeldung . pattern . chainofresponsibility . AuthenticationProcessor authProcessorChain = com . baeldung . chainofresponsibility . ChainOfResponsibilityIntegrationTest . getChainOfAuthProcessor ( ) ; boolean isAuthorized = authProcessorChain .... | org . junit . Assert . assertTrue ( isAuthorized ) |
notify_whenNonExistingWorker_thenIgnore ( ) { com . hazelcast . simulator . protocol . core . SimulatorAddress nonExistingWorkerAddress = workerAddress ( agentAddress . getAgentIndex ( ) , 100 ) ; com . hazelcast . simulator . coordinator . operations . FailureOperation failure = new com . hazelcast . simulator . coord... | org . junit . Assert . assertEquals ( 0 , failureCollector . getFailureCount ( ) ) |
testGroupColumns_bug45639 ( ) { org . apache . poi . hssf . record . aggregates . ColumnInfoRecordsAggregate agg = new org . apache . poi . hssf . record . aggregates . ColumnInfoRecordsAggregate ( ) ; agg . groupColumnRange ( 7 , 9 , true ) ; agg . groupColumnRange ( 4 , 12 , true ) ; try { agg . groupColumnRange ( 1 ... | org . junit . Assert . assertEquals ( 5 , cirs . length ) |
testSetClassWeights ( ) { java . util . HashMap < java . lang . String , java . lang . String > args = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; args . put ( "data_key" , "a" ) ; args . put ( "model_key" , "b" ) ; args . put ( "class_weights" , "b=2.0,a=1.0" ) ; edu . oswego . csc4... | org . junit . Assert . assertEquals ( expResult . build ( encoder ) , result . build ( encoder ) ) |
testDrawOvalWithZeroWidthAndHeight ( ) { gc . drawOval ( 1 , 2 , 0 , 0 ) ; org . eclipse . swt . internal . graphics . GCAdapter adapter = org . eclipse . swt . graphics . ControlGC_Test . getGCAdapter ( gc ) ; org . eclipse . swt . internal . graphics . GCOperation [ ] gcOperations = adapter . getGCOperations ( ) ; "<... | org . junit . Assert . assertEquals ( 0 , gcOperations . length ) |
testToSymbolsEmptyCollection ( ) { java . util . Collection < org . datacite . mds . domain . AllocatorOrDatacentre > users = new java . util . ArrayList < org . datacite . mds . domain . AllocatorOrDatacentre > ( ) ; java . util . List < java . lang . String > symbols = org . datacite . mds . util . Utils . toSymbols ... | org . junit . Assert . assertTrue ( symbols . isEmpty ( ) ) |
shouldNavigateToArrayEntry ( ) { com . google . gson . JsonObject jsonRoot = new com . google . gson . JsonObject ( ) ; com . google . gson . JsonArray jsonArray = new com . google . gson . JsonArray ( ) ; com . google . gson . JsonElement jsonLeaf = new com . google . gson . JsonObject ( ) ; jsonArray . add ( jsonLeaf... | org . junit . Assert . assertThat ( queryToken . navigate ( jsonRoot ) . get ( 0 ) , org . hamcrest . CoreMatchers . equalTo ( jsonLeaf ) ) |
doesNotContainDeselected ( ) { pipe . controllers . PetriNetComponent dummyComponent = new pipe . controllers . PetriNetControllerTest . DummyPetriNetComponent ( ) ; controller . select ( dummyComponent ) ; controller . deselect ( dummyComponent ) ; "<AssertPlaceHolder>" ; } isSelected ( pipe . controllers . PetriNetCo... | org . junit . Assert . assertFalse ( controller . isSelected ( dummyComponent ) ) |
testSimpleHostname ( ) { hudson . remoting . NoProxyEvaluator evaluator = new hudson . remoting . NoProxyEvaluator ( "jenkinsmaster" ) ; "<AssertPlaceHolder>" ; } shouldProxyHost ( java . lang . String ) { if ( host . toLowerCase ( Locale . ROOT ) . equals ( "localhost" ) ) { return false ; } if ( isIpAddress ( host ) ... | org . junit . Assert . assertFalse ( evaluator . shouldProxyHost ( "jenkinsmaster" ) ) |
testRoundtrip ( ) { org . sagebionetworks . repo . model . UserGroup dto = new org . sagebionetworks . repo . model . UserGroup ( ) ; dto . setId ( "1001" ) ; dto . setCreationDate ( new java . util . Date ( ) ) ; dto . setIsIndividual ( true ) ; dto . setUri ( "/userGroup" ) ; dto . setEtag ( "Bloop" ) ; org . sagebio... | org . junit . Assert . assertEquals ( dto , dto2 ) |
callbacksOrderSuccess ( ) { java . util . List < java . lang . String > callbacks = new java . util . ArrayList ( ) ; final org . mule . runtime . core . internal . event . DefaultEventContext eventContext = context . get ( ) ; eventContext . onResponse ( ( e , t ) -> callbacks . add ( "onResponse" ) ) ; eventContext .... | org . junit . Assert . assertThat ( callbacks , org . hamcrest . Matchers . contains ( "onResponse" , "onComplete" , "onTerminated" ) ) |
testInitInvalidRemoteConfigFile ( ) { com . alibaba . druid . pool . DruidDataSource dataSource = new com . alibaba . druid . pool . DruidDataSource ( ) ; dataSource . setFilters ( "config" ) ; dataSource . setConnectionProperties ( "config.file=abcdef" ) ; java . lang . Exception error = null ; try { dataSource . init... | org . junit . Assert . assertNotNull ( error ) |
testRefreshEncodesValuesPropertly ( ) { browser . get ( ( ( ( getBaseURL ( ) ) + ( getContextPath ( ) ) ) + "/1<sp>1/2<sp>2" ) ) ; java . lang . String expected = browser . getCurrentUrl ( ) ; browser . findElement ( org . openqa . selenium . By . id ( "refresh" ) ) . click ( ) ; "<AssertPlaceHolder>" ; } getContextPat... | org . junit . Assert . assertEquals ( expected , browser . getCurrentUrl ( ) ) |
testSearchPerfObjectScope ( ) { org . apache . directory . ldap . client . api . LdapConnection connection = org . apache . directory . server . core . integ . IntegrationUtils . getAdminConnection ( getService ( ) ) ; org . apache . directory . api . ldap . model . cursor . EntryCursor cursor = connection . search ( "... | org . junit . Assert . assertEquals ( 1 , i ) |
testDoNotFlushCacheEntriesOnTrace ( ) { final org . apache . hc . core5 . http . HttpHost host = new org . apache . hc . core5 . http . HttpHost ( "foo.example.com" ) ; final org . apache . hc . core5 . http . HttpRequest req = new org . apache . hc . client5 . http . classic . methods . HttpTrace ( "/bar" ) ; final ja... | org . junit . Assert . assertEquals ( entry , backing . map . get ( key ) ) |
testShort ( ) { final short TEST_CASE = ( ( short ) ( 62510 ) ) ; java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( 2 ) ; buffer = buffer . order ( ByteOrder . BIG_ENDIAN ) ; buffer . putShort ( TEST_CASE ) ; short readShort = com . nhnent . haste . common . ByteRead . getShort ( buffer . array ( ) ... | org . junit . Assert . assertEquals ( TEST_CASE , readShort ) |
multiThreadedSyncOnBuildingsTest ( ) { final org . apache . olingo . odata2 . api . edm . EdmEntitySet edmEntitySet = createMockedEdmEntitySet ( "Buildings" ) ; java . util . concurrent . CountDownLatch latch ; java . util . List < java . lang . Thread > threads = new java . util . ArrayList < java . lang . Thread > ( ... | org . junit . Assert . assertEquals ( max , buildings . size ( ) ) |
hashIndexTable_copyConstructor ( ) { com . eclipsesource . json . JsonObject . HashIndexTable original = new com . eclipsesource . json . JsonObject . HashIndexTable ( ) ; original . add ( "name" , 23 ) ; com . eclipsesource . json . JsonObject . HashIndexTable copy = new com . eclipsesource . json . JsonObject . HashI... | org . junit . Assert . assertEquals ( 23 , copy . get ( "name" ) ) |
testData4 ( ) { net . tomp2p . storage . Data data = new net . tomp2p . storage . Data ( 1 , 100000 ) ; net . tomp2p . storage . Data newData = encodeDecode ( data ) ; "<AssertPlaceHolder>" ; } encodeDecode ( net . tomp2p . storage . Data ) { io . netty . buffer . CompositeByteBuf transfer = io . netty . buffer . Unpoo... | org . junit . Assert . assertEquals ( data , newData ) |
testGetClient ( ) { org . elasticsearch . client . Client client = searchClientService . getClient ( ) ; "<AssertPlaceHolder>" ; } getClient ( ) { return client ( "server1" ) ; } | org . junit . Assert . assertNotNull ( client ) |
testDefaultBatchSize ( ) { org . apache . metron . common . configuration . writer . IndexingWriterConfiguration config = new org . apache . metron . common . configuration . writer . IndexingWriterConfiguration ( "hdfs" , new org . apache . metron . common . configuration . IndexingConfigurations ( ) ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( 1 , config . getBatchSize ( "foo" ) ) |
testParse ( ) { final java . lang . Object newValue = getValue ( ) . parseTextEntry ( null , "1980-01-01<sp>10:40" ) ; final java . util . Calendar calendar = java . util . Calendar . getInstance ( ) ; calendar . setTimeZone ( java . util . TimeZone . getTimeZone ( "Etc/UTC" ) ) ; calendar . set ( 1980 , 0 , 1 , 10 , 4... | org . junit . Assert . assertEquals ( calendar . getTime ( ) , newValue ) |
basic3 ( ) { java . util . List < java . lang . Integer > a = com . google . common . collect . Lists . newArrayList ( ) ; java . util . List < java . lang . Integer > b = com . google . common . collect . Lists . newArrayList ( ) ; java . util . List < java . lang . Integer > c = com . google . common . collect . List... | org . junit . Assert . assertEquals ( com . google . common . collect . Lists . newArrayList ( ) , result ) |
testOAuth2MultipleBatches ( ) { com . streamsets . pipeline . stage . origin . http . HttpClientSourceIT . tokenGetCount = 0 ; try { com . streamsets . pipeline . config . DataFormat dataFormat = com . streamsets . pipeline . config . DataFormat . JSON ; com . streamsets . pipeline . stage . origin . http . HttpClientC... | org . junit . Assert . assertEquals ( 2 , com . streamsets . pipeline . stage . origin . http . HttpClientSourceIT . tokenGetCount ) |
loadNumericBooleanUsingV1Schema_UnmarshallsCorrectly ( ) { stubGetItemRequest ( "booleanAttr" , software . amazon . awssdk . services . dynamodb . model . AttributeValue . builder ( ) . n ( "1" ) . build ( ) ) ; final software . amazon . awssdk . services . dynamodb . mapper . V2CompatibleBooleansTest . UnitTestPojo po... | org . junit . Assert . assertTrue ( pojo . getBooleanAttr ( ) ) |
testIsMatching_oneTrue ( ) { org . deegree . gml . reference . matcher . MultipleReferencePatternMatcher matcher = new org . deegree . gml . reference . matcher . MultipleReferencePatternMatcher ( ) ; matcher . addMatcherToApply ( mockMatcher ( true ) ) ; matcher . addMatcherToApply ( mockMatcher ( false ) ) ; "<Assert... | org . junit . Assert . assertThat ( matcher . isMatching ( "test" ) , org . hamcrest . CoreMatchers . is ( true ) ) |
droppedTable ( ) { org . apache . hadoop . hive . metastore . api . Table t = newTable ( "default" , "dt" , false ) ; addDeltaFile ( t , null , 1L , 2L , 2 ) ; addDeltaFile ( t , null , 3L , 4L , 2 ) ; burnThroughTransactions ( "default" , "dt" , 4 ) ; org . apache . hadoop . hive . metastore . api . CompactionRequest ... | org . junit . Assert . assertEquals ( 0 , compacts . size ( ) ) |
putElementInIndexEdgeItem ( ) { final java . util . HashMap < java . lang . String , java . lang . Object > parameters = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; parameters . put ( "class" , "edge" ) ; parameters . put ( "key" , "weight" ) ; parameters . put ( "value" , "(f,0.2)" ... | org . junit . Assert . assertEquals ( this . toyGraph . getEdge ( 12 ) , e ) |
getJobIdSucceed ( ) { final java . lang . String jobId = "validJobId" ; final java . lang . String connectionString = "validConnectionString" ; com . microsoft . azure . sdk . iot . service . devicetwin . Job job = tests . unit . com . microsoft . azure . sdk . iot . service . devicetwin . Deencapsulation . newInstance... | org . junit . Assert . assertEquals ( jobId , result ) |
testHasRemotePortForwardingStarted ( ) { int port = startRemotePF ( ) ; "<AssertPlaceHolder>" ; } hasRemotePFStarted ( int ) { return session . isRemotePortForwardingStartedForPort ( port ) ; } | org . junit . Assert . assertTrue ( hasRemotePFStarted ( port ) ) |
setNormalRoleName ( ) { com . aliyuncs . auth . ECSMetadataServiceCredentialsFetcher fetcher = new com . aliyuncs . auth . ECSMetadataServiceCredentialsFetcher ( ) ; "<AssertPlaceHolder>" ; fetcher . setRoleName ( "role" ) ; } | org . junit . Assert . assertNotNull ( fetcher ) |
constructor ( ) { final org . sentilo . agent . kafka . repository . ProcessResult result = new org . sentilo . agent . kafka . repository . ProcessResult ( pendingEvent ) ; "<AssertPlaceHolder>" ; } getPendingEvent ( ) { return pendingEvent ; } | org . junit . Assert . assertEquals ( pendingEvent , result . getPendingEvent ( ) ) |
testDirectory ( ) { java . io . File f = new java . io . File ( emptyFile ) ; java . lang . String dir = f . getParent ( ) ; "<AssertPlaceHolder>" ; org . easymock . EasyMock . checkOrder ( phMock , false ) ; phMock . createAndPublish ( new java . io . File ( emptyFile ) , epAddr , true ) ; java . lang . String file = ... | org . junit . Assert . assertNotNull ( dir ) |
matchesContext ( ) { final org . apache . rya . api . function . sp . StatementPatternMatcher matcher = new org . apache . rya . api . function . sp . StatementPatternMatcher ( org . apache . rya . api . function . sp . StatementPatternMatcherTest . getSp ( ( "s" 0 + ( ( ( "GRAPH<sp><urn:testGraph><sp>{" + "?s<sp>?p<sp... | org . junit . Assert . assertEquals ( expected , bs . get ( ) ) |
testMergePDFBlobs ( ) { org . nuxeo . ecm . platform . pdf . PDFMerge pdfm = new org . nuxeo . ecm . platform . pdf . PDFMerge ( ) ; pdfm . addBlob ( new org . nuxeo . ecm . core . api . impl . blob . FileBlob ( org . nuxeo . common . utils . FileUtils . getResourceFileFromContext ( TestUtils . PDF_MERGE_1 ) ) ) ; pdfm... | org . junit . Assert . assertNotNull ( result ) |
testSendCommandsToRouterWithTrueResult ( ) { com . cloud . network . router . NetworkHelperImpl nwHelperUT = spy ( this . nwHelper ) ; com . cloud . network . router . VirtualRouter vr = mock ( com . cloud . network . router . VirtualRouter . class ) ; when ( vr . getHostId ( ) ) . thenReturn ( com . cloud . network . ... | org . junit . Assert . assertTrue ( result ) |
testPut ( ) { javax . ws . rs . client . Invocation . Builder request = org . jboss . resteasy . test . rx . RxCompletionStageServerAsyncTest . client . target ( org . jboss . resteasy . test . rx . RxCompletionStageServerAsyncTest . generateURL ( "/put/string" ) ) . request ( ) ; javax . ws . rs . core . Response resp... | org . junit . Assert . assertEquals ( "a" , response . readEntity ( java . lang . String . class ) ) |
testMappingError ( ) { try { maxweight . setDecimal ( false , new com . graphhopper . storage . IntsRef ( 0 ) , 4 ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception ex ) { } } setDecimal ( boolean , com . graphhopper . storage . IntsRef , double ) { int storageInt = toStorageMap . getOrDefault ( toInt ( valu... | org . junit . Assert . assertTrue ( false ) |
canListLocations ( ) { com . microsoft . azure . PagedList < com . microsoft . azure . management . resources . Location > locations = com . microsoft . azure . management . resources . SubscriptionsTests . resourceManager . subscriptions ( ) . list ( ) . get ( 0 ) . listLocations ( ) ; "<AssertPlaceHolder>" ; } size (... | org . junit . Assert . assertTrue ( ( ( locations . size ( ) ) > 0 ) ) |
testSerial ( ) { org . apache . commons . math4 . optim . linear . LinearObjectiveFunction f = createFunction ( ) ; java . util . Collection < org . apache . commons . math4 . optim . linear . LinearConstraint > constraints = createConstraints ( ) ; org . apache . commons . math4 . optim . linear . SimplexTableau table... | org . junit . Assert . assertEquals ( tableau , org . apache . commons . math4 . TestUtils . serializeAndRecover ( tableau ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.