FitNesse.NET
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.

do
withtypestory test

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

checktest result
sample do
namemy samplemake sample dohello

usemy sample
checktexthello

sample do
namemy samplemake sample dohello

usemy sample
checktexthello

The fixture to use can be a new fixture.

checktest result
usesample do
checkone1

usesample do
checkone1

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

checktest result
sample domain
setnameBob

usedowithcurrent
checknameBob

sample domain
setnameBob

usedowithcurrent
checknameBob

An error is reported if the fixture is not found or the fixture name is missing.

checktest result
do

usegarbage

use

withnewsample domainJoe
namejoesnamename

usejoesname

do

use
System.ApplicationException: Type 'garbage' could not be found in assemblies.
garbage

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

withnewsample domainJoe
namejoesnamename

use
fitlibrary.exception.FitFailureException: Result is not a Fixture.
joesname
© Copyright 2007,2008 Syterra Software Inc. All rights reserved.