Fixtures are simple classes that are used to set up a naked objects system. The code for a fixture should be placed in the install method, which is run when the system installs the fixtures. Fixtures are only installed if the NakedObjectPersistor flags that it is uninitialised via its isInitialized method. For the in memory object store this will be every time it is started, and for other object stores will only be when they detect they have no persistent data.
Fixtures are registered with the Framework at startup via the properties file, using the fixtures properties. The fixtures property itself dictates which fixture classes are to be instantiated at startup, for example:
nakedobjects.fixtures = fixture.BookingsFixture, fixture.PerspectivesFixture
The prefix property allows you specify the common package name once and, hence omit them from the classes in the list. The following set of properties is therefore equivalent to the previous example.
nakedobjects.fixtures.prefix = fixture nakedobjects.fixtures = BookingsFixture, PerspectivesFixture