Report for lv.id.jc.machine.unit.ControlUnitBuySpec


Summary:

Created on Tue Nov 15 13:34:41 UTC 2022 by runner
Executed features Passed Failures Errors Skipped Success rate Time
2 2 0 0 0 100.0% 0.138 seconds
The customer buys a coffee drink
As a coffee lover
I want to choose and buy a coffee drink 
So that I can enjoy my favorite beverage
See:

Features:

should prepare coffee drink if enough resources Return
(0.012 seconds)
Given:
a storage unit with a certain amount of resources
And:
a control unit manging the storage and having a mock display
And:
we switch to main menu mode
When:
the customer chooses the menu to buy coffee
Then:
the customer receives a coffee drink selection menu
When:
the customer chooses his favorite drink
Then:
the display shows a message confirming that coffee is being prepared
And:
the amount of resources changes in accordance with the coffee recipe and its price
And:
after making coffee, the system returns to the main menu mode
Where:
initial resources in the storage unit and selected coffee drink
And:
message confirming the successful preparation of a coffee drink
And:
new volume of ingredients after making a coffee drink
Examples:
water milk beans cups cash beverage message expectedMilk expectedWater expectedBeans
250 0 16 1 280 Espresso I have enough resources, making you a coffee! 0 0 0 OK (0.008 seconds)
9045 3080 2756 100 175 Espresso I have enough resources, making you a coffee! 3080 8795 2740 OK (0.001 seconds)
350 75 20 1 0 Latte I have enough resources, making you a coffee! 0 0 0 OK (0.001 seconds)
360 76 21 2 928 Latte I have enough resources, making you a coffee! 1 10 1 OK (0.002 seconds)
200 100 12 1 12 Cappuccino I have enough resources, making you a coffee! 0 0 0 OK (0)
5/5 passed
should state what is missing if not enough resources Return
(0.044 seconds)
Given:
a storage unit with a certain amount of resources
And:
a control unit manging the storage and having a mock display
And:
we switch to main menu mode
When:
the customer chooses the menu to buy coffee
Then:
the customer receives a coffee drink selection menu
When:
the customer chooses his favorite drink
Then:
a message about the lack of resources is displayed on the screen
And:
the amount of available resources in the storage block does not change
And:
the system returns to the main menu mode
Where:
resources in storage device, coffee drink and required resources
And:
a message indicating such resources are not enough
Examples:
water milk beans cups cash beverage requiredResources message
0 0 0 0 0 Espresso [Water, CoffeeBeans, DisposableCups] Sorry, not enough resources: [Water, CoffeeBeans, DisposableCups]! OK (0.029 seconds)
0 0 0 0 1000 Latte [Water, Milk, CoffeeBeans, DisposableCups] Sorry, not enough resources: [Water, Milk, CoffeeBeans, DisposableCups]! OK (0.001 seconds)
0 0 0 1 550 Latte [Water, Milk, CoffeeBeans] Sorry, not enough resources: [Water, Milk, CoffeeBeans]! OK (0.001 seconds)
0 0 20 1 0 Latte [Water, Milk] Sorry, not enough resources: [Water, Milk]! OK (0.001 seconds)
0 75 20 1 280 Latte [Water] Sorry, not enough resources: [Water]! OK (0.006 seconds)
349 74 19 0 950 Latte [Water, Milk, CoffeeBeans, DisposableCups] Sorry, not enough resources: [Water, Milk, CoffeeBeans, DisposableCups]! OK (0.001 seconds)
199 99 11 0 0 Cappuccino [Water, Milk, CoffeeBeans, DisposableCups] Sorry, not enough resources: [Water, Milk, CoffeeBeans, DisposableCups]! OK (0.001 seconds)
455 395 84 0 15 Cappuccino [DisposableCups] Sorry, not enough resources: [DisposableCups]! OK (0.001 seconds)
800 650 0 45 75 Cappuccino [CoffeeBeans] Sorry, not enough resources: [CoffeeBeans]! OK (0.001 seconds)
750 0 95 7 286 Cappuccino [Milk] Sorry, not enough resources: [Milk]! OK (0.001 seconds)
0 300 45 9 16 Cappuccino [Water] Sorry, not enough resources: [Water]! OK (0.001 seconds)
11/11 passed