Available fixtures

Verifier includes a number of fixtures that are used to call the SUT (System Under Test) when GWT (Given-When-Then) style acceptance tests are executed.

Fixture categories

Each Caplin library provides a set of fixtures that are appropriate for exercising its code. These fixtures fall into 5 distinct categories:

  • Generic Verifier Fixtures: The testing library contains the Fixture interface that all other fixtures must implement and the FixtureFactory interface that the test runner uses to gain access to fixtures. More information on all of these classes can be found in the API reference.

  • Presentation Model fixtures: Allow you to test the functional behaviour of your GUI components written using Presenter.

  • GUI Binding fixtures: These fixtures enable you to check that the presentation model has been correctly bound to the browser DOM. For example you can check the actual CSS style of a DOM element when the logical property, that represents the element, changes within the presentation model. The dom library provides the ViewFixture and it’s sub-fixtures (that use JQuery CSS locators) to verify the state of the browser DOM.

  • Service library: Most of the code you write will access shared resources through the service architecture. Each service provides fixtures and stub implementations so that you can run tests in isolation from real services.

  • Bespoke Fixtures: If you create any code that cannot be accessed using the existing fixtures you will have to create your own. For instance, in the worked example we create a fixture for a simple tile component.