GreenPepper supports the expression of rules in table format, bullet list format or number list format. The following examples are equivalent and will yield the same results when executed.
It is important to note that the table and bullet list examples are not executable since the import com.greenpepper.samples.fixture.bank and do with bank rules cannot be specified twice in the same page. Even though it is possible to change between the two methods in the same page, you must keep in mind that the tests are executed in the same system under development. So it is not necessary to re-specify the same rule in the page.
Table
| import |
| com.greenpepper.samples.application.bank |
| do with |
bank |
| open |
checking |
account |
12345-67890 |
under the name of |
Spongebob |
|
Squarepants |
| check |
that balance of account |
12345-67890 |
is |
$0.00 |
| deposit |
$100.00 |
in account |
12345-67890 |
| check |
that balance of account |
12345-67890 |
is |
$100.00 |
Bullet List
- import
- com.greenpepper.samples.application.bank
- do with bank
- open checking account 12345-67890 under the name of Spongebob _Squarepants
- deposit $100.00 in account 12345-67890
- check that balance of account 12345-67890 is $100.00
Number List
- import
- com.greenpepper.samples.application.bank
- do with bank
- open checking account 12345-67890 under the name of Spongebob _Squarepants
- deposit $100.00 in account 12345-67890
- check that balance of account 12345-67890 is $100.00