|
: 5 : 10 : 5 |
Hi,
I am a big friend of developing java agents or java Script-libraries with Eclipse. Following sound design principles as low coupling, high cohesion, the code which actually accesses the Java Api for Domino is well encapsulated in a few classes or methods. All the rest is junit-Testable. The part uses the Java Api for Domino is not. For testing my usage of the Java Domino API, I have to access a real Notes instance. Mock classes would provide a implementation of the API, which does not need a Notes instance.
A mock framework at least for the most important Notes Domino Java classes would make it possible to write proper unit tests and fasten the development process. Developers would not even have to start Domino to use those mock objects. I've started to write one for myself and it appears to work quite well for the classes Database, View, ViewColumn, Document, Item, DocumentCollection. Those are covering 98% of the use cases when I do write something for Domino in Java as for this code the point is the opportunities Java overs and not fancy code in Domino (I do that in formula language, Lotus Script).
If I put my mock implementation open source, I drop a comment here. |