This is a dummy project for the automated testing seminar at Lemundo
- Having no translations in database for de_DE locale
- When a PUT request to /locale/de_DE/translation is sent
- With the json string:
{"id" : "tomato", "text" : "I am a tomato"}
- Then the translation is saved into database and I see the json response:
{ "id": "tomato", "locale": "de_DE", "text": "I am a tomato" }
- Having created in database the translation from 1.1
- When a PUT request to /locale/de_DE/translation is sent
- With the json string:
{"id" : "potato", "text" : "I am a potato"}
- Then the translation is saved into database and I see the json response:
{ "id": "potato", "locale": "de_DE", "text": "I am a potato" }
and the translation from 1.1 remains unmodified
- Having created in database the translation from 1.1
- When a PUT request to /locale/de_DE/translation is sent
- With the json string:
{"id" : "tomato", "text" : "I am a not tomato anymore"}
- Then the translation is saved into database and I see the json response:
{ "id": "tomato", "locale": "de_DE", "text": "I am not a tomato anymore" }
and the one from 1.1 was overwritten
- Having no translations in database for de_DE locale
- When a GET request is sent to /locale/de_DE/translation
- Then I see the json response:
[]
- Having created in database the translations from 1.1 and 1.2
- When a GET request is sent to /locale/de_DE/translation
- Then I see the json response:
{"tomato": "I am a tomato", "potato": "I am a potato"}
- Having no translation in database for de_DE locale with id tomato
- When a GET request is sent to /locale/de_DE/translation/tomato
- Then I see an http response with status code 404 and body
No translation found
- Having created in database the translation from 1.1
- When a GET request is sent to /locale/de_DE/translation/tomato
- Then I see an http response with status code 404 and body
I am a tomato
- Having a translation in database for de_DE locale with id tomato
- When a DELETE request is sent to /locale/de_DE/translation/tomato
- Then I see an http response with status code 200 and empty body and the translation is removed from database
- Having no translation in database for de_DE locale with id tomato
- When a DELETE request is sent to /locale/de_DE/translation/tomato
- Then I see an http response with status code 200 and empty body
- Having a correct state in server
- When an error happens during processing
- Then I see a json response
{"errorMessage" : the-message, "errorInfo": exception-info}
and status code 500
- Having a correct state in server
- When a request is incorrect
- Then I see a http response with status code 400 and containing the error message in the body
All constraints violations must cause the application to return 400 error.
- Translation Id
- Not empty
- Min length = 3
- Max length = 32
- Alphanumeric string
- Translation text
- Not empty
- Locale
- Must be one of:
de_DE, de_CH, de_AT, en_GB
- Must be one of: