Executed features | Passed | Failures | Errors | Skipped | Success rate | Time |
---|---|---|---|---|---|---|
2 | 2 | 0 | 0 | 0 | 100.0% | 0.033 seconds |
The worker performance
allows us to determine the required number of days to process a particular surface
should accurately calculate days to process surface
Return
(0.001 seconds)
|
|||||||||||||||||||||||||||||
Given:
|
surface that needs to be treated by the worker
|
||||||||||||||||||||||||||||
surface.area() >> areaToProcess |
|||||||||||||||||||||||||||||
When:
|
we create performance object based on the number of surfaces a worker can process in one day
|
||||||||||||||||||||||||||||
def performance = Performance.of(amountPerDay as double) |
|||||||||||||||||||||||||||||
Then:
|
we can accurately calculate the required number of days to process the entire required surface
|
||||||||||||||||||||||||||||
performance.daysToProcess(surface) == expectedDays |
|||||||||||||||||||||||||||||
Examples:
|
|
6/6 passed
|
|||||||||||||||||||||||||||
should throw an exception for a negative number or zero
Return
(0)
|
|||||||||||||||||||||||||||||
When:
|
'' def performance = Performance.of(amountPerDay as double) |
||||||||||||||||||||||||||||
Then:
|
def message = thrown IllegalArgumentException |
||||||||||||||||||||||||||||
And:
|
message =~ "must be a positive" |
||||||||||||||||||||||||||||
Examples:
|
|
4/4 passed
|