From: <moc...@li...> - 2001-11-18 12:52:23
|
Have you considered distributing the mock object classes in multiple jars, partitioned by API? In the current release package mockobjects-java there is one jar file (mockobjects.jar) in the lib directory that contains all the classes. Maybe mock classes corresponding to a particular API could be contained in a separate jar. Something like: mock-sql-jdk1-3-version-0-1.jar - version 0.1 of the mocks for java.sql.* in the 1.3 jdk mock-servlet-2-1-version-1-1.jar - version 1.1 of the mocks for javax.servlet.* in the 2.1 servlet spec. So if I was developing some servlet code (version 2.1) and wanted to use MOs, I'd have mock-servlet-2-1-version-1-1.jar in my unit test classpath. If you split up the classes into more jars then you could separately version the different jars and so possibly attain maturer status for parts of the mock library. This might encourage developers to use the maturer parts of the mockobject code, rather than being put off because a part that they weren't going to use anyway is not quite ready for prime time. Theres a slight problem I guess with shared mockobjects classes clashing if you use more than one MO library. Maybe a solution like versioning numbers in the shared classes package name might solve that. Graham |