Logo: Relish

  1. Sign in

Project: Pub

Order beers

As a pub patron

I want bartenders to take orders asynchronously

So the counter is not blocked

Scenarios
Order a beer
Given
1 pub
And
1 bartender
And
a bartender serves 1 beer per second
When
"John" orders:
beer
Evented Lager
Then
"John" should receive his beer in 1 second
Order multiple beers
Given
1 pub
And
1 bartender
And
a bartender serves 1 beer per second
When
"John" orders:
beer
Evented Lager
Async Pilsen
Then
"John" should receive his beers in 2 seconds
Two bartenders
Given
1 pub
And
2 bartenders
And
a bartender serves 1 beer per second
When
"John" orders:
beer
Evented Lager
Async Pilsen
Then
"John" should receive his beers in 1 second
Timeout
Given
1 pub
And
1 bartender
And
a bartender serves 1 beer per second
And
"John" will not wait over 2 seconds
When
"John" orders:
beer
Evented Lager
Async Pilsen
Blocking Ale
Then
"John" should receive the following beers in 2 seconds:
beer
A pint of Evented Lager
A pint of Async Pilsen
Two patrons order the same beer
Given
1 pub
And
1 bartender
And
a bartender serves 1 beer per second
When
"John" orders:
beer
Evented Lager
And
"Jane" orders:
beer
Evented Lager
Then
"John" should receive his beer in 1 second
And
"Jane" should receive her beer in 1 second
Crowd
Given
1 pub
And
10 bartenders
And
a bartender serves 1 beer per second
When
10 patrons order 1 beer each
Then
each should receive their beers within 1 second
Overcrowding
Given
1 pub
And
2 bartenders
And
a bartender serves 1 beer per second
When
4 patrons order 2 beers each
Then
each should receive their beers within 4 seconds
Multiple pubs
Given
10 pubs
And
each has 1 bartender
And
a bartender serves 1 beer per second
When
"John" orders in each pub:
beer
Evented Lager
Then
"John" should receive his beers in 1 second
Able bartenders
Given
10 pubs
And
each has 1 bartender
And
a bartender serves 2 beers per second
When
2 patrons order 1 beer each
Then
each should receive their beers within 1 second

Last published about 5 years ago by hakanensari.