Executed features | Passed | Failures | Errors | Skipped | Success rate | Time |
---|---|---|---|---|---|---|
2 | 2 | 0 | 0 | 0 | 100.0% | 0.044 seconds |
Project Customer calculates the price of the material
As the customer of the project I want to calculate the price of the material for the surface So that I be able to calculate the total cost of processing the zone
should calculate the price of materials with default material area factor
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 material with default area factor
|
||||||||||||||||||||||||||||
def priceFunction = MaterialPrice.norm() |
|||||||||||||||||||||||||||||
Then:
|
we get accurately calculated the cost of the material for the surface
|
||||||||||||||||||||||||||||
priceFunction.apply(surface) == expectedPrice |
|||||||||||||||||||||||||||||
Examples:
|
|
3/3 passed
|
|||||||||||||||||||||||||||
should calculate the price of materials with certain material area factor
Return
(0.001 seconds)
|
|||||||||||||||||||||||||||||
Given:
|
surface for processing with a given area
|
||||||||||||||||||||||||||||
surface.area() >> surfaceArea |
|||||||||||||||||||||||||||||
When:
|
we create a function with certain material area factor
|
||||||||||||||||||||||||||||
def priceFunction = MaterialPrice.of(materialAreaFactor) |
|||||||||||||||||||||||||||||
Then:
|
we get accurately calculated the cost of the material for the surface
|
||||||||||||||||||||||||||||
priceFunction.apply(surface) == expectedPrice |
|||||||||||||||||||||||||||||
Examples:
|
|
6/6 passed
|