Report for lv.id.jc.AssignmentTest


Summary:

Created on Tue Oct 25 14:34:31 UTC 2022 by runner
Executed features Passed Failures Errors Skipped Success rate Time
1 1 0 0 0 100.0% 0.084 seconds
Work Assignment

Features:

should calculate fund balance for work assignment Return
(0.020 seconds)
Given:
worker with defined salary and bonus
worker.salary(workScope) >> workerSalary
worker.personalBonus(_ as BigDecimal) >> workerBonus
And:
work scope with defined bill
workScope.bill() >> zonesBill
When:
we create an assignment
def assignment = new Assignment(worker, workScope, VendorBonus.of(vendorBonus))
Then:
we get calculated fund balance
assignment.fundBalance() == expectedFundBalance
And:
the balance of funds must be calculated using the formula
expectedFundBalance = zonesBill - (workerSalary + workerBonus)
Examples:
workerSalary vendorBonus workerBonus zonesBill expectedFundBalance
400 100 100 1000 500 OK (0.020 seconds)
1/1 passed