Interface class for test fixtures
Fixture interface class is the means
by which test authors create custom fixtures. Fixtures configure the
environment state required for tests.
Classes deriving from the
must implement the
setup method. This method executes
the changes to the environment. A fixture should restore the environment
to its initial state when it is torn down. To restore the environment,
addTeardown method in the
or implement the fixture’s
Subclasses can set the
in their constructors to provide descriptions for the actions performed
The testing framework can display these descriptions when setting
up and tearing down the fixture.
A class that derives from
Fixture must implement
isCompatible method if its constructor accepts
any input arguments or is otherwise configurable.
use this method to define a notion of interchangeability of fixtures.
matlab.unittest.fixtures instances of the same
class are considered to be interchangeable if the
the result of
isCompatible to determine whether
two fixture instances of the same class correspond to the same shared
test fixture state.
Description of fixture setup actions, specified as a character
Description of fixture teardown actions, specified as a character
|addTeardown||Dynamically add teardown routine to |
|applyFixture||Set up fixture to delegate work to another fixture|
|isCompatible||Determine if two fixtures of the same class are interchangeable|
|log||Record diagnostic information during fixture setup and teardown|
|needsReset||Report whether shared test fixture needs to be reset|
|onFailure||Dynamically add diagnostics for failures during fixture setup and teardown|
|setup||Set up fixture|
|teardown||Tear down fixture|
Triggered upon failing assertion. A
Triggered upon passing assertion. A
Triggered upon failing assumption. A
Triggered upon passing assumption. A
Triggered upon failing fatal assertion. A
Triggered upon passing fatal assertion. A
Triggered by the
Triggered by the
Handle. To learn how handle classes affect copy operations, see Copying Objects.