Files
mylibrary/src/test/resources/features/subscription.feature

28 lines
1.5 KiB
Gherkin
Raw Normal View History

2025-06-07 14:52:44 +02:00
# language: en
Feature: Manage customer subscription
Background:
Given the system has the following customers:
2025-06-09 22:52:27 +02:00
| customerId | firstName | lastName | phoneNumer | pointsFidelite |
| 11111111-1111-1111-1111-111111111111 | John | Doe | 0612345678 | 100 |
| 22222222-2222-2222-2222-222222222222 | Bob | Dupond | 0687654321 | 50 |
| 33333333-3333-3333-3333-333333333333 | Alice | Untel | 0698765432 | 0 |
2025-06-07 14:52:44 +02:00
Scenario: Create a new subscription
When I create a new subscription with CB:
2025-06-09 22:52:27 +02:00
| customerId | duration | paymentMethod |
| 11111111-1111-1111-1111-111111111111 | 12 | CB |
2025-06-07 14:52:44 +02:00
Then a new subscription is created
Scenario: Create a new subscription
When I create a new subscription with Paypal:
2025-06-09 22:52:27 +02:00
| customerId | duration | paymentMethod |
| 22222222-2222-2222-2222-222222222222 | 24 | Paypal |
2025-06-07 14:52:44 +02:00
Then a new subscription is created
Scenario: Attempt to create a subscription with invalid duration:
When I try to create a new subscription with the following information:
2025-06-09 22:52:27 +02:00
| customerId | duration | paymentMethod |
| 33333333-3333-3333-3333-333333333333 | 0 | CB |
2025-06-07 14:52:44 +02:00
Then the subsription duration creation fails
And I receive an error for validation subscription message containing "Duration must be positive"