This project is read-only.

Implementing fixtures in NO MVC

Aug 1, 2013 at 8:36 PM
Hi all,

I'm currently coding along to 'Domain-Driven Design using Naked Objects' trying to port over the Java instructions in the book to the nakedobjects.net framework stack.

I'm up to a section on creating an in memory fixture but I'm not quite sure where to 'wire it up'. I have a fixtures code lib and created a class which derives from AbstractFixture and I need to reference and load this into MVC.

The page is 57 which describes this if that helps.

Thanks in advance.
Rob
Aug 2, 2013 at 7:25 AM
This feature is supported on NO MVC, but only for in-memory persistor (not the EF persistor). Download the user guide (http://nakedobjects.codeplex.com/documentation) and see section 2.2.11.

If using the EF persistor, then the suggestion is to use the EF Database Initializer; see 2.1.1.2.

But I can tell you that in the main NO MVC project I'm working on, we've ended up writing our own fixture management stuff (for integration testing). You might be best rolling your own also.

~~~
On the Java side of the house, Apache Isis (the original NOF's successor) does still support installing fixtures (in the way I described in the book) against RDBMS'; there's a guard to ensure that these are only run in once. This works well if using our RDBMS persistor with an in-memory DB (such as HSQLDB).

HTH
Dan