|
From: Trevor C. <tc...@in...> - 2003-03-14 19:14:56
|
Perfect. Similiarly I created all my mock test objects in com.interface21.jdbc.mock , so it sounds like it will stay compatible. Rod, do we have a new clover jar available? The current one is = expired, and I wanted to run coverage tests before submitting my jdbc tests (I = emailed you a few days ago, but may have messed up the address). Trevor D. Cook -----Original Message----- From: j=FCrgen h=F6ller [werk3AT] [mailto:jue...@we...] Sent: March 14, 2003 1:53 PM To: spr...@li... Subject: [Springframework-developer] mock objects Hi everybody, I'm currently trying to integrate the basic mock objects from the test = tree into the src tree, on the occasion of writing some test suites for an application project that uses Spring. The rationale behind this is that = most of the mock objects are not just useful for Spring tests but also for application tests. This demands including them in the Spring = distribution, and thus moving them to the main source tree. Besides, the = "servletapi", "mo.ejb", and "jdbc" package names in the test tree aren't proper = anyway. My main need are the JNDI mocks that allow for building a JNDI tree = with the application's environment, containing JDBC data sources and in our case Hibernate session factories - completely without any container. To = achieve this, I've created a new SimpleDataSource mock that simply returns new connections on every getConnection call - which works nicely with = Hibernate (BTW, in contrast to SingleConnectionDataSource that cannot handle = standard Connection.close calls). TestDataSource is now in = com.interface21.jdbc.core in the test tree, derived from SimpleDataSource. Thus, I've moved the JNDI mocks to com.interface21.jndi.mock, and the = JDBC mocks (SimpleDataSource and SingleConnectionDataSource) to com.interface21.jdbc.mock. Consequently, I've additionally moved the 2 = EJB mocks to com.interface21.ejb.mock, and the Servlet mocks to com.interface21.web.mock. I don't use the latter 2 for application = tests currently, but I might choose to do so sometime. Of course, this step adds a few classes to the main source tree and to = the distribution JARS, but that couple of KBs is hardly worth thinking = about. I'd mainly like to know if anyone objects to moving these mock objects = to the main source tree as a matter of principle, and if the new package = names would be OK. Regards, Juergen DI J=FCrgen H=F6ller Senior System Architect __________________________________ werk3ATS - division systementwicklung part of werk3AT internetmedien oeg europaplatz 4 A - 4020 linz t. +43 (0) 732 71 65 29 f. +43 (0) 732 71 65 29 3 jue...@we... www.werk3at.com __________________________________ werk3ATS - WIR ENTWICKELN ERFOLG ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open!=20 Get cracking and register here for some mind boggling fun and=20 the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 / Virus Database: 258 - Release Date: 2/25/03 =20 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 / Virus Database: 258 - Release Date: 2/25/03 =20 |