fitSharp
Name Keyword
The Name keyword is one of the Flow Fixture Keywords. It assigns an object to a symbol name, which can be used to retrieve the object later with the Use Fixture, With Keyword or Symbol Handlers.
A fixture can be saved and then used.

when test is

story test fixture
checktest result
sample do
namesavexmake sample doxxx
namesaveymake sample doyyy

usesavey
checktextyyy

usesavex
checktextxxx

sample do
namesavexmake sample doxxx
namesaveymake sample doyyy

usesavey
checktextyyy

usesavex
checktextxxx

sample do
namesavexmake sample doxxx
namesaveymake sample doyyy

usesavey
checktextyyy

usesavex
checktextxxx
then result is
sample do
namesavexmake sample doxxx
namesaveymake sample doyyy

usesavey
checktextyyy

usesavex
checktextxxx

A domain object can be saved, and is wrapped in a Do fixture when used.

when test is

story test fixture
checktest result
do
namesavebobwithnewsample domainBob

usesavebob
checknameBob

do
namesavebobwithnewsample domainBob

usesavebob
checknameBob

do
namesavebobwithnewsample domainBob

usesavebob
checknameBob
then result is
do
namesavebobwithnewsample domainBob

usesavebob
checknameBob

Errors are reported when the method is invalid or cells are missing.

when test is

story test fixture
checktest result
do

namestuffgarbage

namestuff

name

do

name
Member 'garbage' with 0 parameter(s) not found for type 'fitlibrary.DoFixture'.
stuffgarbage

name
fitlibrary.exception.TableStructureException: This table is invalid for this fixture: missing cells for name.
stuff

name
fitlibrary.exception.TableStructureException: This table is invalid for this fixture: missing cells for name.

do

namestuffgarbage

namestuff

name
then result is
do

name
Member 'garbage' with 0 parameter(s) not found for type 'fitlibrary.DoFixture'.
stuffgarbage

name
fitlibrary.exception.TableStructureException: This table is invalid for this fixture: missing cells for name.
stuff

name
fitlibrary.exception.TableStructureException: This table is invalid for this fixture: missing cells for name.

Objects are assigned to symbols.

when test is

story test fixture
checktest result
sample do
namesavebobwithnewsample domainBob
checkget name<<savebobBob

sample do
namesavebobwithnewsample domainBob
checkget name<<savebob fit.Test.Double.SampleDomainBob

sample do
namesavebobwithnewsample domainBob
checkget name<<savebobBob
then result is
sample do
namesavebobwithnewsample domainBob
checkget name<<savebob fit.Test.Double.SampleDomainBob

© Copyright Syterra Software Inc. All rights reserved.