Report for lv.id.jc.worker.SeniorWorkerTest


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.022 seconds
Junior Worker
calculation of wages and personal bonus for a senior worker

Features:

should calculate personal bonus for senior work Return
(0)
Given:
senior worker with any payment and performance parameters
def worker = new SeniorWorker(_ as Payment, _ as Performance)
Expect:
''
worker.personalBonus(vendorBonus) == personalBonus
Examples:
vendorBonus personalBonus
0.0 0 OK (0)
100.0 150 OK (0)
55.55 83.325 OK (0)
3/3 passed
should calculate salary for senior worker Return
(0.001 seconds)
Given:
daily rate and worker productivity
def payment = Payment.of(dailyRate)
def performance = Performance.of(amountPerDay)
And:
senior worker with given payment and performance parameters
def worker = new SeniorWorker(payment, performance)
When:
we have a surface to be treated
def surface = Stub(Surface) { area() >> surfaceArea }
Then:
we get accurate calculated wages of this worker for a given surface
worker.salary(surface) == seniorSalary
Examples:
dailyRate amountPerDay surfaceArea seniorSalary
120.0 20.0 100 720 OK (0.001 seconds)
109.5 21.3 287 1839.6 OK (0)
2/2 passed