diff --git a/src/test/java/com/challenges/price_finder/e2e/PriceFinderStepDefinitions.java b/src/test/java/com/challenges/price_finder/e2e/PriceFinderStepDefinitions.java index afe8592..9ae8f62 100644 --- a/src/test/java/com/challenges/price_finder/e2e/PriceFinderStepDefinitions.java +++ b/src/test/java/com/challenges/price_finder/e2e/PriceFinderStepDefinitions.java @@ -4,8 +4,6 @@ import java.math.RoundingMode; import static org.hamcrest.CoreMatchers.is; -import org.hamcrest.MatcherAssert; - import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.notNullValue; import org.springframework.boot.test.web.server.LocalServerPort; diff --git a/src/test/resources/features/price_finder.feature b/src/test/resources/features/price_finder.feature index 306abbf..635aeab 100644 --- a/src/test/resources/features/price_finder.feature +++ b/src/test/resources/features/price_finder.feature @@ -6,14 +6,15 @@ Feature: Price Finder API When I request the price for brand , product at "" Then the response status code should be And the response should contain the price details + And the price should be Examples: - | brandId | productId | applicationDate | statusCode | - | 1 | 35455 | 2020-06-14T10:00:00 | 200 | - | 1 | 35455 | 2020-06-14T16:00:00 | 200 | - | 1 | 35455 | 2020-06-14T21:00:00 | 200 | - | 1 | 35455 | 2020-06-15T10:00:00 | 200 | - | 1 | 35455 | 2020-06-16T21:00:00 | 200 | + | brandId | productId | applicationDate | statusCode | expectedPrice | + | 1 | 35455 | 2020-06-14T10:00:00 | 200 | 35.50 | + | 1 | 35455 | 2020-06-14T16:00:00 | 200 | 25.45 | + | 1 | 35455 | 2020-06-14T21:00:00 | 200 | 35.50 | + | 1 | 35455 | 2020-06-15T10:00:00 | 200 | 30.50 | + | 1 | 35455 | 2020-06-16T21:00:00 | 200 | 38.95 | Scenario: Get price for non-existent product Given the Price Finder API is available