fitSharp
Use Fixture
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.

The fixture to use can be one saved with the Name Keyword.

when input is
story test fixture
checkplain test'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
'sample do'
name 'my sample' 'make sample do' hello

use 'my sample'
check text hello
then output is
sample do
name my sample make sample do hello

use my sample
check text hello

The fixture to use can be a new fixture.

when input is
story test fixture
checkplain testuse 'sample do'
check one 1
use sample do
check one 1
use 'sample do'
check one 1
then output is
use sample do
check one 1

The System Under Test can be set using the With Keyword.

when input is
story test fixture
checkplain test'sample domain'
set name Bob

use do with current
check name Bob
sample domain
set name Bob

use do with current
check name Bob
'sample domain'
set name Bob

use do with current
check name Bob
then output is
sample domain
set 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.

when input is
story test fixture
checkplain testuse garbage

use

with new 'sample domain' Joe
name joesname name
use joesname
use
Type 'garbage' not found in assemblies
garbage

use
This table is invalid for this fixture: Missing cells for use.

with new sample domain Joe
name joesname name
use
Result is not a Fixture.
joesname
use garbage

use

with new 'sample domain' Joe
name joesname name
use joesname
then output is
use
Type 'garbage' not found in assemblies
garbage

use
This table is invalid for this fixture: Missing cells for use.

with new sample domain Joe
name joesname name
use
Result is not a Fixture.
joesname
© Copyright Syterra Software Inc. All rights reserved.