Every storytest has a test-level System Under Test. This object can be set with the With Keyword. When we use a custom flow fixture to control Flow Mode, we can also set this test-level System Under Test in our fixture code.
Some fixtures have a fixture-level System Under Test property, which contains the object used by the fixture. This property may be set in our fixture code with SetSystemUnderTest(myObject) and often can be supplied to the fixture constructor.
Some fixtures are created automatically by fitSharp when a result is returned by a method in Flow Mode. This result is used as the System Under Test for the automatically-created fixture.
Whenever a fixture is created, if the test-level System Under Test has been set and the new fixture has a SetSystemUnderTest method, the test-level object is passed to the new fixture.
The Use Fixture can also be used to create a new fixture and supply it with a System Under Test.
When we create a flow fixture in the body of a storytest that is already in Flow Mode, this fixture has a fixture-level System Under Test.
Some fixtures, like Compute Fixture, do not have a System Under Test property and always use the fixture that creates them as a Domain Adapter.
|when input is⇓||with new 'sample domain' Bob|
with new 'sample domain' Sue
|then output is|
Every object used by fixtures can be an instance of the system under test, or it can be a Domain Adapter.
Multiple objects can be saved and re-used as Symbol Values.