Boiling when it is cheap
A cheap boil tells the kettle to wait until the price is low, so you do not have to watch it. You fill the kettle, choose the price you call cheap and ask for a cheap boil. The kettle waits until the price reaches your cheap rate, then boils.
A cheap boil only reacts to a price it can trust. While the feed is unavailable there is no price, so the kettle keeps waiting and does not boil on an old one. The same goes for a price that arrives while the feed is live: it is checked against your cheap rate as soon as it comes.
Asking for a cheap boil makes the kettle wait
If the cheap boil is off, fill the kettle, set the price you call cheap and tap Boil when cheap. The Cheap boil button reads "Waiting for a cheap price".
See it in Boil when the power is cheap.
How this is tested not run
Given the cheap boil is off When the user asks for a cheap boil Then the cheap boil is waiting
A cheap price starts the boil
The kettle starts the moment a live price reaches your cheap rate.
If the cheap boil is waiting and the price feed is live, have the test provider send a price at or below your cheap rate. The display reads HEATING and a banner says the price is cheap.
See it in Boil when the power is cheap.
How this is tested not run
Given the cheap boil is waiting And the price feed is live When the price drops to the cheap rate Then the cheap boil is boiling
Without a price the kettle keeps waiting
No price means nothing to compare with your cheap rate, so the kettle stays as it was.
Whenever the cheap boil is waiting and the price feed is unavailable, the Cheap boil button reads "Waiting for a cheap price".
See it in Boil when the power is cheap.
How this is tested not run
Given the cheap boil is waiting And the price feed is unavailable Then the cheap boil is waiting