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.
- name <saved-name> <method> <parameters>
- name <saved-name> with <with-phrase>
A fixture can be saved and then used.
| check | test result |
| sample do |
| name | savex | make sample do | xxx |
| name | savey | make sample do | yyy |
|
| sample do | | name | savex | make sample do | xxx | | name | savey | make sample do | yyy |
|
A domain object can be saved, and is wrapped in a Do fixture when used.
| check | test result |
| do |
| name | savebob | with | new | sample domain | Bob |
|
| do | | name | savebob | with | new | sample domain | Bob |
|
Errors are reported when the method is invalid or cells are missing.
| check | test result |
|
name
fitlibrary.exception.InvalidMethodException: Missing method 'garbage' with 0 argument(s).
| stuff | garbage |
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.
|
|