FitNesse.NET
Name Keyword
The Name keyword is one of the Flow Fixture Keywords. It associates an object with a name, which can be used to retrieve the object later with the Use Fixture or With Keyword.
do
withtypestory test

A fixture can be saved and then used.

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

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

checktest result
do
namesavebobwithnewsample domainBob

usesavebob
checknameBob

do
namesavebobwithnewsample domainBob

usesavebob
checknameBob

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

checktest result
do

namestuffgarbage

namestuff

name

do

name
fitlibrary.exception.InvalidMethodException: Missing method 'garbage' with 0 argument(s).
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.
© Copyright 2007,2008 Syterra Software Inc. All rights reserved.