Executed features | Passed | Failures | Errors | Skipped | Success rate | Time |
---|---|---|---|---|---|---|
1 | 1 | 0 | 0 | 0 | 100.0% | 0.020 seconds |
Project Customer calculates the price of the work
As the customer of the project I want to calculate the price of the work for the surface So that I be able to calculate the total cost of processing the zone
should calculate the price of work for the surface
Return
(0.002 seconds)
|
|||||||||||||||||||||||||||||
Given:
|
surface for processing with a given area
|
||||||||||||||||||||||||||||
surface.area() >> surfaceArea |
|||||||||||||||||||||||||||||
When:
|
we create a function for calculating the cost of work
|
||||||||||||||||||||||||||||
def priceFunction = WorkPrice.of(workPrice) |
|||||||||||||||||||||||||||||
Then:
|
we get accurately calculated the cost of the work
|
||||||||||||||||||||||||||||
priceFunction.apply(surface) == expectedPrice |
|||||||||||||||||||||||||||||
Where:
|
the cost of processing a unit area, the surface area and expected price
|
||||||||||||||||||||||||||||
Examples:
|
|
6/6 passed
|