PagSeguro iOS Dev Interview Job Challenge
As an online customer
I want the app to automatically load the beer list
So I can see all the beers
Given the customer has connectivity
When the customer requests to see the beer list
Then the app should display the beers from remote
Given the customer doesn't have connectivity
When the customer requests to see the beer list
Then the app should display an error message
- URL
- Execute "Load Beer List" command with above data.
- System downloads data from the URL.
- System validates downloaded data.
- System creates beer list from valid data.
- System delivers beer list.
- System delivers invalid data error.
- System delivers connectivity error.
- URL
- Execute "Load Image Data" command with above data.
- System downloads data from the URL.
- System validates downloaded data.
- System delivers image data.
- System does not deliver image data nor error.
- System delivers invalid data error.
- System delivers connectivity error.
Property | Type |
---|---|
id |
Int |
name |
String |
tagline |
String |
description |
String |
image_url |
URL |
abv |
Double |
ibu |
Double(optional) |
GET /beers
200 RESPONSE
[
{
"id": 0,
"name": "a name",
"tagline": "a tagline",
"description": "a description",
"image_url": "https://a-image-url.com",
"abv": 0,
"ibu": 0
},
{
"id": 1,
"name": "another name",
"tagline": "another tagline",
"description": "another description",
"image_url": "https://another-image-url.com",
"abv": 1,
"ibu": 1
}
...
]