Main Content

setup

Class: matlab.unittest.fixtures.Fixture
Package: matlab.unittest.fixtures

Set up fixture

Syntax

setup(f)

Description

setup(f) sets up a fixture by performing the defined environment modifications. Classes deriving from the Fixture interface 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, use the addTeardown method in the setup method or implement the fixture's teardown method.

Input Arguments

f

matlab.unittest.fixtures.Fixture instance