input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
constructor_should_compress_graph_at_construction ( ) { au . edu . wehi . idsv . graph . BasePathGraph pg = PG ( G ( 4 ) . add ( "GTACCTA" ) ) ; "<AssertPlaceHolder>" ; } getPathCount ( ) { return pathCount ; } | org . junit . Assert . assertEquals ( 1 , pg . getPathCount ( ) ) |
testBuilderMetGroep ( ) { final nl . bzk . brp . domain . leveringmodel . MetaObject persoon = nl . bzk . brp . domain . leveringmodel . helper . TestBuilders . maakLeegPersoon ( ) . metGroep ( ) . metGroepElement ( nl . bzk . brp . domain . leveringmodel . PERSOON_GEBOORTE ) . eindeGroep ( ) . build ( ) ; "<AssertPlac... | org . junit . Assert . assertNotNull ( persoon . getGroep ( nl . bzk . brp . domain . leveringmodel . PERSOON_GEBOORTE ) ) |
testParseQuotedDate ( ) { final java . util . Date date1 = org . apache . hc . client5 . http . utils . TestDateUtils . createDate ( 2005 , Calendar . OCTOBER , 14 ) ; final java . lang . String [ ] formats = new java . lang . String [ ] { DateUtils . PATTERN_RFC1123 } ; final java . util . Date date2 = org . apache . ... | org . junit . Assert . assertEquals ( date1 , date2 ) |
shouldEchoServerSendBinaryFrameWithPayloadFragmentedAndInjectedPingPong ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; final java . util . List < java . nio . ByteBuffer > bufferList = new java . util . ArrayList ( ) ;... | org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) ) |
testHideDefaultTimings ( ) { com . gorillalogic . monkeytalk . Command cmd = new com . gorillalogic . monkeytalk . Command ( "Button<sp>OK<sp>Click" ) ; "<AssertPlaceHolder>" ; } getCommand ( ) { return _command ; } | org . junit . Assert . assertThat ( cmd . getCommand ( ) , org . hamcrest . CoreMatchers . is ( "Button<sp>OK<sp>Click" ) ) |
inline_rcvMult ( ) { final java . lang . String rulebase = "rules/reloaded/msg003.prova" ; java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( ) ; java . util . Map < java . lang . String , java . lang . Object > globals = new java . util . HashMap < java . ... | org . junit . Assert . assertEquals ( 2 , count . get ( ) ) |
testDistributeWithTwoEntities ( ) { long timestamp = 100 ; java . lang . String entityOne = ( ( java . lang . String ) ( messageOne . get ( "ip_src_addr" ) ) ) ; org . apache . metron . profiler . MessageRoute routeOne = new org . apache . metron . profiler . MessageRoute ( createDefinition ( profileOne ) , entityOne ,... | org . junit . Assert . assertEquals ( 2 , measurements . size ( ) ) |
zoekNietFoutievePersoonslijstOpActueelAnummer ( ) { final nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst brpPersoonslijst = new nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstBuilder ( ) . build ( ) ; org . mockito . Mockito . when ( brpPersoonslijstService . zoekPersoonOpAnumme... | org . junit . Assert . assertSame ( brpPersoonslijst , result ) |
whenNotEnoughTotalVotes_thenFail ( ) { final org . baeldung . persistence . model . Post post = new org . baeldung . persistence . model . Post ( ) ; post . setMinScoreRequired ( 5 ) ; post . setMinTotalVotes ( 15 ) ; final org . baeldung . reddit . util . PostScores postScores = new org . baeldung . reddit . util . Po... | org . junit . Assert . assertTrue ( didPostGoalFail ( post , postScores ) ) |
testPropertyIsNullEncoding ( ) { org . opengis . filter . FilterFactory2 ff = new org . geotools . filter . FilterFactoryImpl ( ) ; org . opengis . filter . Filter filter = ff . isNull ( ff . property ( org . geotools . filter . v2_0 . bindings . PropertyIsNullTypeBindingTest . PROP ) ) ; org . geotools . xsd . Configu... | org . junit . Assert . assertEquals ( org . geotools . filter . v2_0 . bindings . PropertyIsNullTypeBindingTest . PROP , prop ) |
testFlatten2D ( ) { org . apache . commons . math3 . linear . RealMatrix [ ] m1 = new org . apache . commons . math3 . linear . RealMatrix [ ] { new org . apache . commons . math3 . linear . Array2DRowRealMatrix ( new double [ ] [ ] { new double [ ] { 1 , 2 , 3 } , new double [ ] { 4 , 5 , 6 } } ) , new org . apache . ... | org . junit . Assert . assertArrayEquals ( expected , actual , 0.0 ) |
testSubstringOfExpression ( ) { org . odata4j . expression . BoolMethodExpression ex = org . odata4j . expression . Expression . substringOf ( org . odata4j . expression . Expression . string ( "BCD" ) , org . odata4j . expression . Expression . string ( "ABCDE" ) ) ; boolean evaluate = org . odata4j . producer . inmem... | org . junit . Assert . assertTrue ( evaluate ) |
testSurviveErrorOnOpen ( ) { System . out . println ( "Survive<sp>error<sp>on<sp>open<sp>with<sp>WALSource" ) ; java . io . File basedir = com . cloudera . util . FileUtil . mktempdir ( ) ; basedir . deleteOnExit ( ) ; java . io . File logDir = new java . io . File ( basedir , NaiveFileWALManager . LOGGEDDIR ) ; logDir... | org . junit . Assert . assertTrue ( okstate . get ( ) ) |
shouldMarshalAndUnmarshalValidZoneId ( ) { java . time . ZoneId zone = java . time . ZoneId . of ( "Europe/Berlin" ) ; "<AssertPlaceHolder>" ; } marshalAndUnmarshal ( java . time . ZoneId ) { return new org . opennms . netmgt . config . users . TimeZoneIdAdapter ( ) . unmarshal ( new org . opennms . netmgt . config . u... | org . junit . Assert . assertEquals ( zone , marshalAndUnmarshal ( zone ) ) |
testWriteAnchor ( ) { tag . writeAnchor ( tag . createTagWriter ( ) , PaginationInfo . DEFAULT_DISABLED_HREF , "" ) ; java . lang . String expected = "<a<sp>href=\"javascript:void(0)\"></a>" ; "<AssertPlaceHolder>" ; } getOutput ( ) { return this . writer . toString ( ) ; } | org . junit . Assert . assertThat ( getOutput ( ) , org . hamcrest . CoreMatchers . is ( expected ) ) |
testKeys ( ) { K key1 = keyFactory . instance ( ) ; V value1 = valueFactory . instance ( ) ; org . junit . Assume . assumeTrue ( ( ( key1 instanceof java . lang . String ) || ( key1 instanceof byte [ ] ) ) ) ; redisTemplate . opsForValue ( ) . set ( key1 , value1 ) ; K keyPattern = ( key1 instanceof java . lang . Strin... | org . junit . Assert . assertNotNull ( redisTemplate . keys ( keyPattern ) ) |
testCommitThenRollback ( ) { com . hazelcast . core . Transaction transaction = instance . getTransaction ( ) ; transaction . begin ( ) ; com . hazelcast . core . IMap < java . lang . String , java . lang . String > imap = instance . getMap ( com . alu . e3 . common . caching . TestICacheImpl . AUTH_MAP_NAME ) ; "<Asse... | org . junit . Assert . assertNull ( imap . get ( "key" ) ) |
runTest ( ) { boolean result = checkNoError ( "Social_Communities_Get_My_Invites" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
assureInputInBatchModeWhenNotRequired ( ) { final com . microsoft . azure . maven . function . AddMojo mojo = getMojoFromPom ( ) ; final com . microsoft . azure . maven . function . AddMojo mojoSpy = spy ( mojo ) ; final java . util . Set < java . lang . String > set = new java . util . HashSet ( ) ; mojoSpy . assureIn... | org . junit . Assert . assertTrue ( set . contains ( "a0" ) ) |
testBug53792a ( ) { javax . el . MethodExpression me = factory . createMethodExpression ( context , "${beanA.setBean(beanB)}" , null , new java . lang . Class < ? > [ ] { org . apache . el . TesterBeanB . class } ) ; me . invoke ( context , null ) ; me = factory . createMethodExpression ( context , ( ( "${beanB.setName... | org . junit . Assert . assertEquals ( org . apache . el . TestMethodExpressionImpl . BUG53792 , actual ) |
testRemoveResourcesCostCategoryAssignment ( ) { org . libreplan . business . costcategories . entities . ResourcesCostCategoryAssignment assignment = createValidResourcesCostCategoryAssignment ( ) ; resourcesCostCategoryAssignmentDAO . save ( assignment ) ; resourcesCostCategoryAssignmentDAO . remove ( assignment . get... | org . junit . Assert . assertFalse ( resourcesCostCategoryAssignmentDAO . exists ( assignment . getId ( ) ) ) |
testWritableWithColumns ( ) { org . apache . hadoop . hive . accumulo . AccumuloHiveRow rowWithColumns = new org . apache . hadoop . hive . accumulo . AccumuloHiveRow ( "row" ) ; rowWithColumns . add ( "cf" , "cq1" , "1" . getBytes ( ) ) ; rowWithColumns . add ( "cf" , "cq2" , "2" . getBytes ( ) ) ; java . io . ByteArr... | org . junit . Assert . assertEquals ( rowWithColumns , copy ) |
testMeter ( ) { org . mockito . Mockito . when ( sampleBuilder . createSample ( "meter" , "_total" , java . util . Collections . < java . lang . String > emptyList ( ) , java . util . Collections . < java . lang . String > emptyList ( ) , 2 ) ) . thenReturn ( new io . prometheus . client . Collector . MetricFamilySampl... | org . junit . Assert . assertEquals ( new java . lang . Double ( 2 ) , registry . getSampleValue ( "meter_total" ) ) |
test ( ) { org . simpleflatmapper . reflect . getter . ArraySizeGetter getter = new org . simpleflatmapper . reflect . getter . ArraySizeGetter ( ) ; "<AssertPlaceHolder>" ; getter . toString ( ) ; } getInt ( org . simpleflatmapper . csv . CsvRow , org . simpleflatmapper . converter . Context , int ) { return target . ... | org . junit . Assert . assertEquals ( 3 , getter . getInt ( new java . lang . String [ ] { "" , "" , "" } ) ) |
testMultiColumn ( ) { org . gradoop . common . model . impl . properties . PropertyValue a = org . gradoop . common . model . impl . properties . PropertyValue . create ( "Foo" ) ; org . gradoop . common . model . impl . properties . PropertyValue b = org . gradoop . common . model . impl . properties . PropertyValue .... | org . junit . Assert . assertEquals ( ( ( org . apache . commons . lang . ArrayUtils . toString ( embedding . getRawProperty ( 0 ) ) ) + ( org . apache . commons . lang . ArrayUtils . toString ( embedding . getRawProperty ( 1 ) ) ) ) , udf . getKey ( embedding ) ) |
testMatchExactly ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( true ) ) |
testBizTwoAddCustomer ( ) { com . alibaba . cola . test . AddCustomerCmd addCustomerCmd = new com . alibaba . cola . test . AddCustomerCmd ( ) ; context . setBizCode ( Constants . BIZ_TWO ) ; addCustomerCmd . setContext ( context ) ; com . alibaba . cola . test . CustomerCO customerCO = new com . alibaba . cola . test ... | org . junit . Assert . assertTrue ( response . isSuccess ( ) ) |
oneEntityIsTheSameAsItself ( ) { cleancoderscom . entities . Entity e1 = new cleancoderscom . entities . Entity ( ) ; e1 . setId ( "e1ID" ) ; "<AssertPlaceHolder>" ; } isSame ( cleancoderscom . entities . Entity ) { return ( ( id ) != null ) && ( java . util . Objects . equals ( id , entity . id ) ) ; } | org . junit . Assert . assertTrue ( e1 . isSame ( e1 ) ) |
testOverwriteTable ( ) { java . lang . String namespace = "foo" ; mgr . setTable ( goodNetwork , org . cytoscape . model . CyNode . class , namespace , table1 ) ; mgr . setTable ( goodNetwork , org . cytoscape . model . CyNode . class , namespace , table2 ) ; org . cytoscape . model . CyTable other = mgr . getTable ( g... | org . junit . Assert . assertSame ( table2 , other ) |
deveObterNumeroComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroEndereco retornoConsultaCadastroEndereco = new com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroEndereco ( ) ; retornoConsultaCadastroEndereco . set... | org . junit . Assert . assertEquals ( "1435" , retornoConsultaCadastroEndereco . getNumero ( ) ) |
testNietAlleHoofdPersonenVerwerkbaar ( ) { final nl . bzk . brp . bijhouding . bericht . model . RelatieElement relatieElement = builder . maakHuwelijkElement ( "CI_huwelijk" , "1" , builder . maakRelatieGroepElement ( "CI_relatie" , new nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . RelatieGroepParam... | org . junit . Assert . assertNull ( actieElement . verwerk ( bericht , administratieveHandeling ) ) |
testGetObjectFromFolder ( ) { repositoryFactory . logOnProject ( sampleProject ) ; org . talend . core . model . properties . Property property = PropertiesFactory . eINSTANCE . createProperty ( ) ; property . setAuthor ( sampleProject . getAuthor ( ) ) ; property . setVersion ( VersionUtils . DEFAULT_VERSION ) ; prope... | org . junit . Assert . assertNotNull ( objectFromFolder ) |
parseApacheHttpdOnlyDurationTime ( ) { com . navercorp . pinpoint . agent . plugin . proxy . apache . ApacheRequestParser parser = new com . navercorp . pinpoint . agent . plugin . proxy . apache . ApacheRequestParser ( ) ; final long currentTimeMillis = java . lang . System . currentTimeMillis ( ) ; java . lang . Stri... | org . junit . Assert . assertFalse ( proxyHttpHeader . isValid ( ) ) |
test_DoublesPair_of_PairDoubleDouble ( ) { org . testng . eclipse . convert . Pair < java . lang . Double , java . lang . Double > base = org . testng . eclipse . convert . ObjectsPair . of ( java . lang . Double . valueOf ( 1.2 ) , java . lang . Double . valueOf ( 2.5 ) ) ; org . testng . eclipse . convert . DoublesPa... | org . junit . Assert . assertEquals ( new org . testng . eclipse . convert . DoublesPair ( 1.2 , 2.5 ) , test ) |
itHandlesEmptyURLs ( ) { com . braintreegateway . TransactionLevelFeeReport report = new com . braintreegateway . TransactionLevelFeeReport ( "" ) ; "<AssertPlaceHolder>" ; } getRows ( ) { return rows ; } | org . junit . Assert . assertEquals ( 0 , report . getRows ( ) . size ( ) ) |
whenDivideTwoLongValues_shouldDivideThemAndReturnTheResultForFloorRounding ( ) { long result = com . google . common . math . LongMath . divide ( 10L , 3L , RoundingMode . FLOOR ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 3L , result ) |
shouldRejectVipsAddress ( ) { org . openstack . atlas . api . validation . results . ValidatorResult result = vipsValidator . validate ( vips , org . openstack . atlas . api . mgmt . validation . validators . VIPS_POST ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . results . ... | org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . mgmt . validation . validators . VIPS_POST ) , result . passedValidation ( ) ) |
testReadFileWithLoadFalse ( ) { com . ibm . sbt . services . client . connections . files . File file = uploadFile ( "testReadFileWithLoadFalse" ) ; com . ibm . sbt . services . client . base . datahandlers . EntityList < com . ibm . sbt . services . client . connections . files . File > listOfFiles = fileService . get... | org . junit . Assert . assertNull ( entry . getCategory ( ) ) |
should_return_false_if_is_author_and_there_is_solution ( ) { org . mamute . model . User author = user ( "Fernanda" , "bla@bla.com" , 1L ) ; org . mamute . model . Question question = question ( author ) ; org . mamute . model . Answer answer = answer ( "" , question , author ) ; question . markAsSolvedBy ( answer ) ; ... | org . junit . Assert . assertFalse ( question . canMarkAsSolution ( author ) ) |
testSum ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( ( 1 + 2 ) , org . hamcrest . CoreMatchers . equalTo ( 3 ) ) |
testGroupByWithViewAlias ( ) { java . lang . String functionColumn = "select<sp>id<sp>from<sp>(select<sp>h.id<sp>from<sp>hotnews<sp>h<sp>union<sp>select<sp>h.title<sp>from<sp>hotnews<sp>h<sp>)<sp>as<sp>t1<sp>group<sp>by<sp>t1.id;" ; java . lang . Object result = invokeGroupBy ( functionColumn ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertEquals ( functionColumn , ( ( java . lang . String [ ] ) ( result ) ) [ 0 ] ) |
testGetUpdateAction ( ) { classUnderTest . setUpdateAction ( 10 ) ; "<AssertPlaceHolder>" ; } getUpdateAction ( ) { return updateAction ; } | org . junit . Assert . assertEquals ( 10 , classUnderTest . getUpdateAction ( ) ) |
testIsDone_True ( ) { initializeExpectedOperation ( 3 ) ; com . google . cloud . compute . deprecated . Compute [ ] expectedOptions = new Compute . OperationOption [ ] { Compute . OperationOption . fields ( Compute . OperationField . STATUS ) } ; expect ( compute . getOptions ( ) ) . andReturn ( mockOptions ) ; expect ... | org . junit . Assert . assertTrue ( operation . isDone ( ) ) |
testGetTask ( ) { java . util . List < org . camunda . bpm . engine . task . Task > tasks = taskService . createTaskQuery ( ) . processDefinitionKey ( "oneTaskProcess" ) . list ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return deletedCache . isEmpty ( ) ; } | org . junit . Assert . assertFalse ( tasks . isEmpty ( ) ) |
testWaitForReportReady_polls ( ) { com . google . api . client . util . Sleeper sleeper = mock ( com . google . api . client . util . Sleeper . class ) ; com . google . api . ads . admanager . axis . utils . v201811 . ReportDownloader downloader = new com . google . api . ads . admanager . axis . utils . v201811 . Repo... | org . junit . Assert . assertTrue ( downloader . waitForReportReady ( ) ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . wiki . model . WikiPageResource > wikiPageResources = _persistence . fetchByPrimaryKeys (... | org . junit . Assert . assertTrue ( wikiPageResources . isEmpty ( ) ) |
testChangeCacheKeyModifiedIsTrue ( ) { com . ewcms . common . query . cache . CacheResult result = new com . ewcms . common . query . cache . CacheResult ( "testCacheKey" , 100 , new java . util . ArrayList < java . lang . Object > ( ) ) ; com . ewcms . common . query . cache . CacheResult newResult = new com . ewcms .... | org . junit . Assert . assertTrue ( newResult . isModified ( ) ) |
testBuildWithDisabledSecurityConstraintWithOrderBy ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . degree . type . DegreeType context = new org . lnu . is . domain . degree . type . DegreeType ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "abbrName" , ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testBuildWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . person . name . PersonName context = new org . lnu . is . domain . person . name . PersonName ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>PersonName<sp>e<sp>" ; org . lnu... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
tesNegativeInfinity ( ) { org . apache . commons . math3 . linear . RealMatrix m = org . apache . commons . math3 . linear . MatrixUtils . createRealMatrix ( new double [ ] [ ] { new double [ ] { Double . NEGATIVE_INFINITY , Double . NEGATIVE_INFINITY , Double . NEGATIVE_INFINITY } } ) ; java . lang . String expected =... | org . junit . Assert . assertEquals ( expected , actual ) |
testListImagesRequest ( ) { try { com . fit2cloud . aliyun . ecs . model . request . ListImagesRequest r = new com . fit2cloud . aliyun . ecs . model . request . ListImagesRequest ( "cn-qingdao" ) ; r . setPageSize ( 2 ) ; com . fit2cloud . aliyun . ecs . model . response . ListImagesResponse response = client . listIm... | org . junit . Assert . assertTrue ( ( ( response . getTotalCount ( ) ) > 0 ) ) |
testSerialization ( ) { org . jfree . chart . axis . LogAxis a1 = new org . jfree . chart . axis . LogAxis ( "Test<sp>Axis" ) ; org . jfree . chart . axis . LogAxis a2 = ( ( org . jfree . chart . axis . LogAxis ) ( org . jfree . chart . TestUtils . serialised ( a1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( T extend... | org . junit . Assert . assertEquals ( a1 , a2 ) |
testGetDatatypeId ( ) { org . wikidata . wdtk . datamodel . implementation . DatatypeIdValue o1 = new org . wikidata . wdtk . datamodel . implementation . DatatypeIdImpl ( DatatypeIdValue . DT_TIME ) ; org . wikidata . wdtk . datamodel . implementation . DatatypeIdValue o2 = factory . getDatatypeIdValue ( DatatypeIdVal... | org . junit . Assert . assertEquals ( o1 , o2 ) |
testPutThenGetOneFileWithSpecialChars ( ) { java . lang . String testFileName = "testPutThenGetOneFileWithSpecialChars.txt" ; java . lang . String testRetrievedFileName = "testPutThenGetOneFileRetreived,.txt" ; java . lang . String absPath = org . irods . jargon . core . pub . DataTransferOperationsImplTest . scratchFi... | org . junit . Assert . assertEquals ( origChecksum , retrievedChecksum ) |
testGetSingleton_fromMultiThreadedNestedCalls ( ) { org . eclipse . rap . rwt . internal . SingletonManager . install ( uiSession ) ; org . eclipse . rap . rwt . internal . SingletonManager_Test . DependantTestSingleton . currentUISession = uiSession ; org . eclipse . rap . rwt . internal . SingletonManager singletonMa... | org . junit . Assert . assertNotNull ( singleton ) |
testReturnTypeException ( ) { java . lang . Object expected = new java . lang . Object ( ) ; java . lang . Object result = org . slieb . throwables . UnaryOperatorWithThrowable . castUnaryOperatorWithThrowable ( ( v1 ) -> { throw new java . lang . Exception ( "expect<sp>exception" ) ; } ) . thatReturnsOnCatch ( expecte... | org . junit . Assert . assertEquals ( expected , result ) |
testDoubleResultType ( ) { org . openscience . cdk . qsar . result . IDescriptorResult type = new org . openscience . cdk . qsar . result . DoubleResultType ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( type ) |
deleteStack_connectionFailed ( ) { createBasicParameters ( "instanceName" , "fosi_v2.json" , "http" ) ; org . oscm . app . openstack . MockHttpURLConnection connection = new org . oscm . app . openstack . MockHttpURLConnection ( 400 , org . oscm . app . openstack . MockURLStreamHandler . respServerActions ( ) ) ; conne... | org . junit . Assert . assertEquals ( 400 , e . getResponseCode ( ) ) |
testSelectAllFilterBaseTable ( ) { org . verdictdb . core . sqlobject . BaseTable base = new org . verdictdb . core . sqlobject . BaseTable ( "myschema" , "mytable" , "t" ) ; org . verdictdb . core . sqlobject . SelectQuery relation = org . verdictdb . core . sqlobject . SelectQuery . create ( java . util . Arrays . < ... | org . junit . Assert . assertEquals ( expected , actual ) |
testFetchAndLockWithoutTenantId ( ) { identityService . setAuthentication ( "aUserId" , null , java . util . Arrays . asList ( org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyExternalTaskCmdsTenantCheckTest . TENANT_ONE ) ) ; java . util . List < org . camunda . bpm . engine . exter... | org . junit . Assert . assertEquals ( 0 , externalTasks . size ( ) ) |
overrideExpectationRecordedInBeforeMethod ( ) { new mockit . Expectations ( ) { { foo . getAnotherValue ( ) ; result = 45 ; } } ; "<AssertPlaceHolder>" ; foo . doSomething ( "sdf" ) ; } getAnotherValue ( ) { return 2 ; } | org . junit . Assert . assertEquals ( 45 , foo . getAnotherValue ( ) ) |
importAccountDataErrorTest ( ) { int startingCount = jdbcTemplate . queryForInt ( "select<sp>count(*)<sp>from<sp>account" ) ; jobLauncher . run ( job , new org . springframework . batch . core . JobParametersBuilder ( ) . addString ( "inputResource" , accountsErrorResource . getFile ( ) . getAbsolutePath ( ) ) . addLon... | org . junit . Assert . assertEquals ( ( startingCount + accountsAdded ) , jdbcTemplate . queryForInt ( "select<sp>count(*)<sp>from<sp>account" ) ) |
testGetVirtualServer ( ) { org . rackspace . stingray . client . virtualserver . VirtualServer vs = client . getVirtualServer ( vsName ) ; "<AssertPlaceHolder>" ; } getVirtualServer ( java . lang . String ) { return getItem ( name , org . rackspace . stingray . client . virtualserver . VirtualServer . class , ClientCon... | org . junit . Assert . assertNotNull ( vs ) |
testEvaluate_MDNMessage_noParentMsgId_assertNullId ( ) { org . nhindirect . monitor . expression . MessageIdCorrelationExpression exp = new org . nhindirect . monitor . expression . MessageIdCorrelationExpression ( ) ; java . util . Map < java . lang . String , org . nhindirect . common . tx . model . TxDetail > detail... | org . junit . Assert . assertNull ( exp . evaluate ( exchange , java . lang . String . class ) ) |
testToDBObject_emptyDocumentVisibility ( ) { final com . mongodb . BasicDBObject dbObject = org . apache . rya . mongodb . document . visibility . DocumentVisibilityAdapter . toDBObject ( MongoDbRdfConstants . EMPTY_DV ) ; final com . mongodb . BasicDBObject expected = ( ( com . mongodb . BasicDBObject ) ( com . mongod... | org . junit . Assert . assertEquals ( expected , dbObject ) |
testLista ( ) { mx . edu . um . mateo . general . model . Usuario usuario = obtieneUsuario ( ) ; mx . edu . um . mateo . inscripciones . model . Prorroga prorroga = null ; for ( int i = 0 ; i < 20 ; i ++ ) { prorroga = new mx . edu . um . mateo . inscripciones . model . Prorroga ( "1110475" , new java . util . Date ( )... | org . junit . Assert . assertNotNull ( prorroga . getId ( ) ) |
getNDR ( ) { final com . rapid7 . client . dcerpc . Header header = unmarshalHeader ( com . rapid7 . client . dcerpc . Test_Header . HEADER_HEX_STRING ) ; "<AssertPlaceHolder>" ; } getNDR ( ) { return ndr ; } | org . junit . Assert . assertArrayEquals ( new byte [ ] { 16 , 0 , 0 , 0 } , header . getNDR ( ) ) |
shouldRespectWithNullMap ( ) { io . sundr . it . Eager item = new io . sundr . it . EagerBuilder ( ) . withMap ( null ) . build ( ) ; "<AssertPlaceHolder>" ; } getMap ( ) { return this . map ; } | org . junit . Assert . assertNull ( item . getMap ( ) ) |
checkMetadataLog1OakDirectional ( ) { com . voxelwind . api . game . level . block . BlockState state = generateTestBlockState ( BlockTypes . WOOD , null , com . voxelwind . api . game . item . data . wood . Log . of ( TreeSpecies . OAK , LogDirection . NONE ) ) ; short metadata = com . voxelwind . server . game . seri... | org . junit . Assert . assertEquals ( 12 , metadata ) |
testStrHalf ( ) { java . lang . String str = "rule<sp>R<sp>when\n" + ( ( "<sp>String(this<sp>str[startsWith]<sp>\"M\"<sp>||<sp>str[endsWith]<sp>\"a\"<sp>||<sp>str[length]<sp>10)" + "then\n" ) + "end<sp>" ) ; org . kie . api . runtime . KieSession ksession = getKieSession ( str ) ; ksession . insert ( "Mario" ) ; ksessi... | org . junit . Assert . assertEquals ( 3 , ksession . fireAllRules ( ) ) |
testRewritePomDependenciesWithNamespace ( ) { java . util . List < org . apache . maven . project . MavenProject > reactorProjects = createReactorProjects ( "pom-with-namespace" ) ; org . apache . maven . shared . release . config . ReleaseDescriptorBuilder builder = createDefaultConfiguration ( reactorProjects , "pom-... | org . junit . Assert . assertTrue ( comparePomFiles ( reactorProjects ) ) |
test_load_relative_file ( ) { java . net . URL u = com . mycila . maven . plugin . license . util . resource . ResourceFinderTest . finder . findResource ( "src/test/data/compileCP/test.txt" ) ; "<AssertPlaceHolder>" ; } findResource ( java . lang . String ) { java . net . URL res ; try { res = toURL ( new java . io . ... | org . junit . Assert . assertTrue ( u . getPath ( ) . contains ( "src/test/data/compileCP/test.txt" ) ) |
testPercentiles ( ) { logger . info ( "percentiles" ) ; com . datumbox . framework . common . dataobjects . FlatDataCollection flatDataCollection = generateFlatDataCollection ( ) ; int cutPoints = 4 ; com . datumbox . framework . common . dataobjects . AssociativeArray expResult = new com . datumbox . framework . commo... | org . junit . Assert . assertEquals ( expResult , result ) |
getNextTupleTest5 ( ) { java . util . List < edu . uci . ics . texera . api . tuple . Tuple > data = edu . uci . ics . texera . dataflow . nlp . entity . NlpEntityTestConstants . getTest4Tuple ( ) ; edu . uci . ics . texera . storage . DataWriter twoSentenceDataWriter = edu . uci . ics . texera . storage . RelationMana... | org . junit . Assert . assertTrue ( contains ) |
testAdjustOldLong ( ) { com . j256 . simplemetrics . metric . ControlledMetricRatio metric = new com . j256 . simplemetrics . metric . ControlledMetricRatio ( "component" , "module" , "name" , "desc" , null ) ; long num1 = 2 ; metric . adjustValue ( num1 ) ; long num2 = 2 ; metric . adjustValue ( num2 ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( ( ( ( double ) ( num1 + num2 ) ) / ( ( double ) ( 2 ) ) ) , ( ( java . lang . Double ) ( metric . getValue ( ) ) ) , 0 ) |
testBuildWithNullContext ( ) { java . util . List < java . lang . Long > context = null ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>UserGroupView<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < java . util . ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
shouldRemoveExistingSoftlinkRelation ( ) { java . lang . String existingSoftLinkRef = "existingSoftLinkRef" ; ch . puzzle . itc . mobiliar . business . softlinkRelation . entity . SoftlinkRelationEntity existingSoftlinkRel = new ch . puzzle . itc . mobiliar . builders . SoftlinkRelationEntityBuilder ( ) . withSoftlinkR... | org . junit . Assert . assertNull ( result ) |
testGetKongParsedInfo ( ) { com . t1t . apim . rest . KongInfo parsedInfo = com . t1t . apim . rest . KongClientIntegrationTest . kongClient . getParsedInfo ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( parsedInfo ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . journal . model . JournalArticle . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( co... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testOkVerhuizendNaarRni ( ) { final nl . bzk . migratiebrp . bericht . model . sync . impl . BlokkeringInfoAntwoordBericht blokkeringInfoAntwoord = new nl . bzk . migratiebrp . bericht . model . sync . impl . BlokkeringInfoAntwoordBericht ( ) ; blokkeringInfoAntwoord . setStatus ( StatusType . OK ) ; blokkeringInfoAntw... | org . junit . Assert . assertTrue ( result . isEmpty ( ) ) |
testMeterNoMatch ( ) { com . codahale . metrics . Meter m = com . streamsets . datacollector . metrics . MetricsConfigurator . createMeter ( com . streamsets . datacollector . execution . alerts . TestMetricRuleEvaluator . metrics , "testMeterNoMatch" , com . streamsets . datacollector . execution . alerts . TestMetric... | org . junit . Assert . assertNull ( gauge ) |
getNumberOfSUserWhoCanStartPendingTask_should_return_users_mapped_through_his_userid_in_actormember ( ) { final org . bonitasoft . engine . actor . mapping . model . SActor actor = repository . add ( anActor ( ) . build ( ) ) ; final org . bonitasoft . engine . core . process . instance . model . SPendingActivityMappin... | org . junit . Assert . assertThat ( numberOfUsers ) |
defaultFieldOnSyntheticIsNoOp ( ) { nl . jqno . equalsverifier . internal . reflection . Outer outer = new nl . jqno . equalsverifier . internal . reflection . Outer ( ) ; nl . jqno . equalsverifier . testhelpers . types . TypeHelper . Outer . Inner inner = outer . new nl . jqno . equalsverifier . testhelpers . types .... | org . junit . Assert . assertSame ( outer , inner . getOuter ( ) ) |
load_bound_fieldValueIsUpdated ( ) { binder . bind ( nameField , Person :: getFirstName , Person :: setFirstName ) ; com . vaadin . tests . data . bean . Person person = new com . vaadin . tests . data . bean . Person ( ) ; java . lang . String name = "bar" ; person . setFirstName ( name ) ; binder . readBean ( person ... | org . junit . Assert . assertEquals ( name , nameField . getValue ( ) ) |
retrieveSecondTimeOperationReturnsSame ( ) { org . talend . esb . job . controller . GenericOperation operation1 = jobLauncher . retrieveOperation ( org . talend . esb . job . controller . internal . JobLauncherRetrieveOperationTest . JOB_NAME_1 , org . talend . esb . job . controller . internal . JobLauncherRetrieveOp... | org . junit . Assert . assertSame ( operation1 , operation2 ) |
count_lines_text_java ( ) { java . io . LineNumberReader lineReader = new java . io . LineNumberReader ( new java . io . FileReader ( java . nio . file . Paths . get ( fileLocation ) . toFile ( ) ) ) ; lineReader . skip ( Long . MAX_VALUE ) ; long totalNumberOfLines = ( lineReader . getLineNumber ( ) ) + 1 ; lineReader... | org . junit . Assert . assertEquals ( 10 , totalNumberOfLines ) |
testConect ( ) { org . biojava . nbio . structure . io . PDBFileParser pdbPars = new org . biojava . nbio . structure . io . PDBFileParser ( ) ; org . biojava . nbio . structure . io . FileParsingParameters params = pdbPars . getFileParsingParameters ( ) ; params . setCreateAtomBonds ( true ) ; java . lang . StringBuil... | org . junit . Assert . assertNotNull ( s ) |
whenGetClassHierarchyIsCalledWithMemberClass_returnedStackContainsMemberAndEnclosingClass ( ) { java . util . Stack < java . lang . Class < ? > > expectedStack = stackForClasses ( Class1stLevel . Class2ndLevel . class , de . bechte . junit . stubs . Class1stLevel . class ) ; java . util . Stack < java . lang . Class < ... | org . junit . Assert . assertThat ( classHierarchy , is ( equalTo ( expectedStack ) ) ) |
testPopulateFailure ( ) { org . apache . storm . metricstore . Metric m = new org . apache . storm . metricstore . Metric ( "cpu" , 3000L , "myTopologyId456" , 1.0 , "componentId2" , "executorId2" , "hostname2" , "streamid2" , 7778 , org . apache . storm . metricstore . AggLevel . AGG_LEVEL_NONE ) ; org . apache . stor... | org . junit . Assert . assertEquals ( false , res ) |
testGetSnapshot_Null ( ) { org . easymock . EasyMock . expect ( computeRpcMock . getSnapshot ( com . google . cloud . compute . deprecated . ComputeImplTest . SNAPSHOT_ID . getSnapshot ( ) , com . google . cloud . compute . deprecated . ComputeImplTest . EMPTY_RPC_OPTIONS ) ) . andReturn ( null ) ; org . easymock . Eas... | org . junit . Assert . assertNull ( compute . getSnapshot ( com . google . cloud . compute . deprecated . ComputeImplTest . SNAPSHOT_ID . getSnapshot ( ) ) ) |
testSave ( ) { nl . bzk . brp . model . objecttype . operationeel . BerichtModel bericht = new nl . bzk . brp . model . objecttype . operationeel . BerichtModel ( nl . bzk . brp . model . objecttype . operationeel . statisch . Richting . INGAAND , new nl . bzk . brp . model . attribuuttype . Berichtdata ( "test" ) ) ; ... | org . junit . Assert . assertNotNull ( bericht . getId ( ) ) |
testSetKeyType ( ) { org . pentaho . hbase . shim . api . Mapping mapping = getMapping ( ) ; mapping . setKeyType ( Mapping . KeyType . STRING ) ; "<AssertPlaceHolder>" ; } setKeyType ( org . pentaho . hbase . shim . api . Mapping$KeyType ) { m_keyType = type ; } | org . junit . Assert . assertEquals ( Mapping . KeyType . STRING , mapping . m_keyType ) |
bgpOpenMessageTest2 ( ) { peer1 . peerChannelHandler . asNumber = 500 ; peer1 . peerChannelHandler . version = 4 ; peer1 . peerChannelHandler . holdTime = 120 ; peer1 . connect ( connectToSocket ) ; boolean result ; result = peer1 . peerFrameDecoder . receivedNotificationMessageLatch . await ( org . onosproject . bgp .... | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( true ) ) |
testNoConfigAndNothingPublished ( ) { subject = new org . eclipse . tycho . plugins . p2 . director . ProductConfig ( null , projectSeeds ) ; "<AssertPlaceHolder>" ; } getProducts ( ) { return products ; } | org . junit . Assert . assertEquals ( java . util . Collections . emptyList ( ) , subject . getProducts ( ) ) |
testGetStaticLabel ( ) { System . out . println ( "getStaticLabel" ) ; java . lang . String result = instance . getStaticLabel ( ) ; "<AssertPlaceHolder>" ; } getStaticLabel ( ) { return kg . apc . jmeter . JMeterPluginsUtils . prefixLabel ( "Response<sp>Codes<sp>per<sp>Second" ) ; } | org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) ) |
testTrue ( ) { "<AssertPlaceHolder>" ; } toTrueFalseString ( boolean ) { return org . dcache . util . Booleans . toPredefinedString ( value , "true" , "false" ) ; } | org . junit . Assert . assertEquals ( "true" , org . dcache . util . Booleans . toTrueFalseString ( true ) ) |
testGetColumnClass ( ) { "<AssertPlaceHolder>" ; } getColumnClass ( int ) { return java . lang . Object . class ; } | org . junit . Assert . assertEquals ( java . lang . Object . class , model . getColumnClass ( 0 ) ) |
tesBerichtSyntaxException ( ) { final java . lang . String berichtOrigineel = org . apache . commons . io . IOUtils . toString ( nl . moderniseringgba . isc . esb . message . brp . impl . NotificatieVerzoekBerichtTest . class . getResourceAsStream ( "notificatieVerzoekBerichtSyntaxExceptionBericht.xml" ) ) ; final nl .... | org . junit . Assert . assertTrue ( ( brpBericht instanceof nl . moderniseringgba . isc . esb . message . brp . impl . OngeldigBericht ) ) |
testScmPortForPerforceShowConfidentialInformation ( ) { com . sap . prd . mobile . ios . mios . versioninfo . v_1_2_2 . SCM scm = new com . sap . prd . mobile . ios . mios . versioninfo . v_1_2_2 . SCM ( ) ; scm . setConnection ( "scm:perforce:p4.example.com:1666://MyProject" ) ; com . sap . prd . mobile . ios . mios .... | org . junit . Assert . assertEquals ( "scm:perforce:p4.example.com:1666://MyProject" , port ) |
testVerifyMax ( ) { int min = 0 ; int max = 100 ; kg . apc . jmeter . gui . IntegerInputVerifier verifier = new kg . apc . jmeter . gui . IntegerInputVerifier ( min , max , kg . apc . jmeter . gui . IntegerInputVerifierTest . background , kg . apc . jmeter . gui . IntegerInputVerifierTest . warningBackground ) ; javax ... | org . junit . Assert . assertTrue ( verifier . verify ( input ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.