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
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:
|
|
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:
|
|
2/2 passed
|