Executed features | Passed | Failures | Errors | Skipped | Success rate | Time |
---|---|---|---|---|---|---|
1 | 1 | 0 | 0 | 0 | 100.0% | 0.084 seconds |
Work Assignment
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:
|
|
1/1 passed
|