Report for lv.id.jc.workscope.ZoneComponentTest


Summary:

Created on Tue Oct 25 14:34:33 UTC 2022 by runner
Executed features Passed Failures Errors Skipped Success rate Time
2 2 0 0 0 100.0% 0.023 seconds
Zone of work
a component test that demonstrates the use of the Zone class

Features:

should calculate all expenses per zone for one day work Return
(0.001 seconds)
Given:
surface for painting
def totalSurface = Surface.square(squareSide)
def apertures = Surface.zero()
And:
formulas for calculating the cost of putty and paint
def putty = MaterialPrice.of(8)
def paint = MaterialPrice.of(7)
And:
formulas for calculating the cost of the relevant work
def puttying = WorkPrice.of(10)
def painting = WorkPrice.of(15)
And:
formula for total expenses includes all other formulas
def expenses = ZonePrice.of(putty, paint, puttying, painting)
When:
we create a work zone with a specific surface and with a given cost
def zone = new Zone(expenses, totalSurface, apertures)
Then:
we get a precisely calculated area of work
zone.area() == expectedArea
And:
we get a correctly and precisely calculated bill
zone.bill() == expectedBill
Examples:
squareSide expectedArea expectedBill durationOfWork
1 1 40 one day work OK (0.001 seconds)
should calculate all expenses per zone for multi day work Return
(0.001 seconds)
Given:
surface for painting
def totalSurface = Surface.square(squareSide)
def apertures = Surface.zero()
And:
formulas for calculating the cost of putty and paint
def putty = MaterialPrice.of(8)
def paint = MaterialPrice.of(7)
And:
formulas for calculating the cost of the relevant work
def puttying = WorkPrice.of(10)
def painting = WorkPrice.of(15)
And:
formula for total expenses includes all other formulas
def expenses = ZonePrice.of(putty, paint, puttying, painting)
When:
we create a work zone with a specific surface and with a given cost
def zone = new Zone(expenses, totalSurface, apertures)
Then:
we get a precisely calculated area of work
zone.area() == expectedArea
And:
we get a correctly and precisely calculated bill
zone.bill() == expectedBill
Examples:
squareSide expectedArea expectedBill durationOfWork
10 100 4250.0 multi day work OK (0.001 seconds)