setup
Class: matlab.unittest.fixtures.Fixture
Namespace: matlab.unittest.fixtures
Set up fixture
Syntax
Description
setup(
makes changes to the
environment when the testing framework sets up the fixture. Classes deriving from the
fixture
)Fixture
interface must implement the setup
method.
A fixture must restore the environment to its original state when the framework tears
down the fixture. To restore the environment, call the addTeardown
method within the setup
method, or implement the
teardown
method.
Input Arguments
Examples
Tips
Only the testing framework calls the
setup
method when setting up the fixture. You cannot directly call the method in your code. To perform the setup actions insetup
, use the fixture by calling theapplyFixture
method.
Version History
Introduced in R2014a