MockGriffonApplication
is a fully functional GriffonApplication with the advantage that it lets you override the location of all configuration classes: Application
, Builder
, Config
and Events
.
If you choose to change the default UIThreadHandler
then you must do it so right after the application has been instantiated and no other operation that requires multi-thread access has been called, otherwise you won't be able to change it's value.
By default, a MockGriffonApplication defines the following:
MockApplication
- setups a 'mock' MVC group with 3 elements: MockModel
, MockView
and MockController
MockBuilderConfig
- defines a single builder entry: griffon.test.mock.MockBuilder
MockConfig
- defines a single config entry: mocked = true
MockEvents
- defines an event handler for 'Mock'
The remaining classes have these settings:
MockBuilder
- a single node named mock
that returns a map with any properties that were defined on the node.
MockModel
- a lone observable property value
of type String.
MockView
- simple script that calls the mock
node defined by the builder.
MockController
- a controller with no actions.