A.2. SetUp

The setup fixtures are used to specify the running application for a particular story's setup. Specifically, this means setting up the services that define the application, the effective date and the effective user. It also allows the setup of arbitrary objects (typically reference/static data objects; for transactional objects see Section A.3.1, “UsingNakedObjectsViewer / UsingNakedObjectsViewerForSetup”).

A.2.1. DateIs

Sets the clock to a specific date and time. This installs the FixtureClock as the implementation of the Clock singleton (in the applib). If this fixture is not called, then the default system clock is used, which gets the time from the host computer. The DebugClock fixture (Section A.4.2, “DebugClock”) can be used to verify the clock state.

A.2.2. LogonAs

Logs on as a specific user.

Unlike Naked Objects' own LogonFixture, the login specified is not remembered to the end of the setup. In order to run tests as a particular login it should therefore appear towards the end of the setup.

A.2.3. AliasServices

Specifies an alias to services in order to invoke actions upon them. Note that the services are not defined by this fixture; for that see SetConfigDirectory fixture, section Section A.1.2, “SetConfigDirectory”. See also DebugServices (Section A.4.1, “DebugServices”) to verify the services that have been identified.

A.2.4. SetUpObjects

Initializes objects. Typically used for immutable reference/standing data objects). Can also be to setup used for transaction/operational data objects (though UsingNakedObjectsViewerForSetup, Section A.3.1, “UsingNakedObjectsViewer / UsingNakedObjectsViewerForSetup”, is preferable). The DebugObjectStore fixture (Section A.4.3, “DebugObjectStore”) can be used to check the state of objects created.