Partly in response to the RAD Race note that Dan has put online, I am interested to discuss the usefulness, and current limitations of, using JMock with Isis.
I am a learner here so it may be that what I say is wrong, but better to learn the easy way, by asking. What I read from Martin Fowler is that a Mock framework, or that approach in general, is different to traditional TDD in that it allows you to test the behaviour of the system better. What I perceive is that with a dependency injection framework, this capability is limited, you can only pass a Mocked container to the first object in a sequence easily, if that object calls other objects, which also need to access the container for dependencies (e.g. domain services to create new objects), then things are not simple. Regarding RAD, it seems that with an IDE you can design your object model in the process of building your tests. If I define a sequence of interations between objects (the message passing analogy) in my Mock test sequence, then each new object method needed can be quickly added to the respective object class definition. A nice programming workflow would seem to be: create the mocked sequences, in the process define the object methods, implement the methods, with unit tests as needed if involve complexity (over and above get/set) This seems to me to be fully TDD. When I write OO code without tests a UML sequence diagram is mostly what I am thinking of, either a mental one or one on paper. By adding Mocks I can speadily get this design into a coded form as a mock test and then implement the details, its going from the big picture down to the small. Without such an approach I would work the other way, building upwards to get a complete working system, before being able see, and refactor, the behaviour I want. So, a question is: Is this already possible? If not, then maybe the solution is to create something like the wrap method, one that turns the Apache Isis DI container itself into a Mock framework? At the minimum this would abstract all the datanucleus calls and allow me to define the order of creation of all new objects as an expectation. A small question re the RAD Race (Dan/Jeroen), was the support for XLS provided by Datanucleus not sufficient to use for loading of fixtures directly from the spreadsheets? Maybe mapping was the problem? Regards Steve Cameron