fitSharp
Fixtures Using Procedures


This is a gallery of common fixtures using procedures.

when input is
story test fixture
checkplain testdefine bobname
set name Bob

define changethename newname
set name newname
return name

define isnamed
return name

action
start 'sample domain'
press bobname
check 'is named' Bob
enter changethename Ted

|'sample column'
changethename isnamed?
Bob Bob

|'sample row domain'
'is named'
Bob
Carol

|'sample calculate domain'
thename '' change
Bob '' Bob

do
with new 'sample domain'
changethename Bob
check isnamed Bob

|'sample setup domain'
changethename
Bob
define bobname
set name Bob

define changethename newname
set name newname
return name

define isnamed
return name

action
start sample domain
press bobname
set name Bob
check is named Bob
return name
enter changethename Ted
set name Ted
return name

sample column
changethename isnamed?
Bob
set name Bob
return name
Bob
return name

sample row domain
is named
Bob
return name
Carol missing
Ted surplus

sample calculate domain
thename change
Bob Bob
set name Bob
return name

do
with new sample domain
changethename
set name Bob
return name
Bob
check isnamed Bob
return name

sample setup domain
changethename
Bob
set name Bob
return name
define bobname
set name Bob

define changethename newname
set name newname
return name

define isnamed
return name

action
start 'sample domain'
press bobname
check 'is named' Bob
enter changethename Ted

|'sample column'
changethename isnamed?
Bob Bob

|'sample row domain'
'is named'
Bob
Carol

|'sample calculate domain'
thename '' change
Bob '' Bob

do
with new 'sample domain'
changethename Bob
check isnamed Bob

|'sample setup domain'
changethename
Bob
then output is
define bobname
set name Bob

define changethename newname
set name newname
return name

define isnamed
return name

action
start sample domain
press bobname
set name Bob
check is named Bob
return name
enter changethename Ted
set name Ted
return name

sample column
changethename isnamed?
Bob
set name Bob
return name
Bob
return name

sample row domain
is named
Bob
return name
Carol missing
Ted surplus

sample calculate domain
thename change
Bob Bob
set name Bob
return name

do
with new sample domain
changethename
set name Bob
return name
Bob
check isnamed Bob
return name

sample setup domain
changethename
Bob
set name Bob
return name

Copyright © 2022 Syterra Software Inc. All rights reserved.