Report for lv.id.jc.workcost.MaterialPriceTest


Summary:

Created on Tue Oct 25 14:34:32 UTC 2022 by runner
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
Issues:

Features:

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:
surfaceArea expectedPrice
0 0 OK (0.002 seconds)
1 10 OK (0)
10.2 102 OK (0)
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:
materialAreaFactor surfaceArea expectedPrice
0 0 0 OK (0)
0 100 0 OK (0)
1 1 1 OK (0.001 seconds)
1 0.1 0.1 OK (0)
3 0.1 0.3 OK (0)
10 1 10 OK (0)
6/6 passed