The
Use Fixture selects a fixture and System Under Test to process the remainder of the current table. The fixture can be one saved with the
Name Keyword or a new fixture. The System Under Test can be set using the
With Keyword.
- use <symbol-name>
- use <fixture-name>
- use <name> with <with-phrase>
The fixture to use can be one saved with the
Name Keyword.
| check | test result |
| sample do |
| name | my sample | make sample do | hello |
| use | my sample |
| check | text | hello |
|
| sample do | | name | my sample | make sample do | hello |
| use | my sample | | check | text | hello |
|
The fixture to use can be a new fixture.
The System Under Test can be set using the
With Keyword.
| check | test result |
| use | do | with | current |
| check | name | Bob |
|
| use | do | with | current | | check | name | Bob |
|
An error is reported if the fixture is not found or the fixture name is missing.
| check | test result |
| with | new | sample domain | Joe |
| name | joesname | name |
|
use
Type 'garbage' not found in assemblies
| garbage |
use
fitlibrary.exception.TableStructureException: This table is invalid for this fixture: Missing cells for use.
|
| with | new | sample domain | Joe | | name | joesname | name |
use
fitlibrary.exception.FitFailureException: Result is not a Fixture.
| joesname |
|