/
Calculator
Calculator
Unknown macro: {greenpepper-info}
Calculator Example
The main purpose of this example is to show you :
- How to handle business rules using the 'Rule For' Interpreter
- How to use the keyword 'error' to handle exceptions
The simplicity of the Calculator example allows to avoid confusion between the system context and the specific behavior of GreenPepper Software.
Another particularity of this example is that we do not need to write a custom fixture : the Calculator.java class will be use directly.
Unknown macro: {greenpepper-import}
Rule for |
calculator |
|||
---|---|---|---|---|
x |
y |
sum? |
product? |
quotient? |
0 |
0 |
0 |
0 |
error |
1 |
0 |
1 |
0 |
error |
0 |
1 |
1 |
0 |
0 |
1 |
1 |
2 |
1 |
1 |
10 |
2 |
12 |
20 |
5 |
Source Code
Unknown macro: {greenpepper-info}
, multiple selections available,
Related content
Writing my first executable specification
Writing my first executable specification
More like this
Specification Guide
Specification Guide
More like this
Advanced
Advanced
More like this
Documentation
Documentation
More like this
Testing a PHP system
Testing a PHP system
More like this
GreenPepper 4.2: Supporting Markdown Specifications
GreenPepper 4.2: Supporting Markdown Specifications
More like this