|
|
|
@@ -21,16 +21,19 @@ Feature: Greet Service
|
|
|
|
When I send a POST request to v2 greet with name "John"
|
|
|
|
When I send a POST request to v2 greet with name "John"
|
|
|
|
Then the response should be "{\"message\":\"Hello my friend John!\"}"
|
|
|
|
Then the response should be "{\"message\":\"Hello my friend John!\"}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@v2 @api
|
|
|
|
Scenario: v2 default greeting with empty name
|
|
|
|
Scenario: v2 default greeting with empty name
|
|
|
|
Given the server is running with v2 enabled
|
|
|
|
Given the server is running with v2 enabled
|
|
|
|
When I send a POST request to v2 greet with name ""
|
|
|
|
When I send a POST request to v2 greet with name ""
|
|
|
|
Then the response should be "{\"message\":\"Hello my friend!\"}"
|
|
|
|
Then the response should be "{\"message\":\"Hello my friend!\"}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@v2 @api
|
|
|
|
Scenario: v2 greeting with missing name field
|
|
|
|
Scenario: v2 greeting with missing name field
|
|
|
|
Given the server is running with v2 enabled
|
|
|
|
Given the server is running with v2 enabled
|
|
|
|
When I send a POST request to v2 greet with invalid JSON "{}"
|
|
|
|
When I send a POST request to v2 greet with invalid JSON "{}"
|
|
|
|
Then the response should be "{\"message\":\"Hello my friend!\"}"
|
|
|
|
Then the response should be "{\"message\":\"Hello my friend!\"}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@v2 @api
|
|
|
|
Scenario: v2 greeting with name that is too long
|
|
|
|
Scenario: v2 greeting with name that is too long
|
|
|
|
Given the server is running with v2 enabled
|
|
|
|
Given the server is running with v2 enabled
|
|
|
|
When I send a POST request to v2 greet with name "ThisNameIsWayTooLongAndShouldFailValidationBecauseItExceedsTheMaximumAllowedLengthOf100Characters!!!!"
|
|
|
|
When I send a POST request to v2 greet with name "ThisNameIsWayTooLongAndShouldFailValidationBecauseItExceedsTheMaximumAllowedLengthOf100Characters!!!!"
|
|
|
|
|