This repository has been archived by the owner on Apr 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1440 from finos/1425-create-tests-for-multiple-fi…
…eld-dependencies test(#1425): added cucumber tests for multiple related date fields
- Loading branch information
Showing
8 changed files
with
216 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 133 additions & 0 deletions
133
...deg/orchestrator/cucumber/features/operators/temporal/DateTimeOtherField-Multiple.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
Feature: running datetimes related to otherfield datetimes for multiple fields | ||
|
||
Background: | ||
Given the generation strategy is full | ||
And there is a field foobar | ||
And foobar has type "datetime" | ||
And there is a field foo | ||
And foo has type "datetime" | ||
And there is a field bar | ||
And bar has type "datetime" | ||
And the combination strategy is exhaustive | ||
|
||
Scenario: Running a "before" and "after" constraint | ||
Given the generator can generate at most 1 rows | ||
And foo is anything but null | ||
And bar is anything but null | ||
And foobar is anything but null | ||
And foobar is before field bar | ||
And foobar is after field foo | ||
Then the following data should be generated: | ||
| foobar | foo | bar | | ||
| 0001-01-01T00:00:00.001Z | 0001-01-01T00:00:00.000Z | 0001-01-01T00:00:00.002Z | | ||
|
||
Scenario: Running a "before" and "equalTo" constraint | ||
Given the generator can generate at most 1 rows | ||
And foo is anything but null | ||
And bar is anything but null | ||
And foobar is anything but null | ||
And foobar is before field bar | ||
And foobar is equal to field foo | ||
Then the following data should be generated: | ||
| foobar | foo | bar | | ||
| 0001-01-01T00:00:00.000Z | 0001-01-01T00:00:00.000Z | 0001-01-01T00:00:00.001Z | | ||
|
||
Scenario: Running an "after" and "equalTo" constraint | ||
Given the generator can generate at most 1 rows | ||
And foo is anything but null | ||
And bar is anything but null | ||
And foobar is anything but null | ||
And foobar is after field bar | ||
And foobar is equal to field foo | ||
Then the following data should be generated: | ||
| foobar | foo | bar | | ||
| 0001-01-01T00:00:00.001Z | 0001-01-01T00:00:00.001Z | 0001-01-01T00:00:00.000Z | | ||
|
||
Scenario: Running two "after" constraints | ||
Given the generator can generate at most 1 rows | ||
And foo is anything but null | ||
And bar is anything but null | ||
And foobar is anything but null | ||
And foobar is after field bar | ||
And foobar is after field foo | ||
Then the following data should be generated: | ||
| foobar | foo | bar | | ||
| 0001-01-01T00:00:00.001Z | 0001-01-01T00:00:00.000Z | 0001-01-01T00:00:00.000Z | | ||
|
||
Scenario: Running two "before" constraints switched other field constraints | ||
Given the generator can generate at most 1 rows | ||
And foo is anything but null | ||
And bar is anything but null | ||
And foobar is anything but null | ||
And bar is before field foobar | ||
And foo is before field foobar | ||
Then the following data should be generated: | ||
| foobar | foo | bar | | ||
| 0001-01-01T00:00:00.001Z | 0001-01-01T00:00:00.000Z | 0001-01-01T00:00:00.000Z | | ||
|
||
Scenario: Running two "before" constraints | ||
Given the generator can generate at most 1 rows | ||
And foo is anything but null | ||
And bar is anything but null | ||
And foobar is anything but null | ||
And foobar is before field bar | ||
And foobar is before field foo | ||
Then the following data should be generated: | ||
| foobar | foo | bar | | ||
| 0001-01-01T00:00:00.000Z | 0001-01-01T00:00:00.001Z | 0001-01-01T00:00:00.001Z | | ||
|
||
Scenario: Running two "after" switched other field constraints | ||
Given the generator can generate at most 1 rows | ||
And foo is anything but null | ||
And bar is anything but null | ||
And foobar is anything but null | ||
And bar is after field foobar | ||
And foo is after field foobar | ||
Then the following data should be generated: | ||
| foobar | foo | bar | | ||
| 0001-01-01T00:00:00.000Z | 0001-01-01T00:00:00.001Z | 0001-01-01T00:00:00.001Z | | ||
|
||
Scenario: Running linked "after" constraint | ||
Given the generator can generate at most 1 rows | ||
And foo is anything but null | ||
And bar is anything but null | ||
And foobar is anything but null | ||
And foobar is after field bar | ||
And bar is after field foo | ||
Then the following data should be generated: | ||
| foobar | foo | bar | | ||
| 0001-01-01T00:00:00.002Z | 0001-01-01T00:00:00.000Z | 0001-01-01T00:00:00.001Z | | ||
|
||
Scenario: Running linked "before" constraint | ||
Given the generator can generate at most 1 rows | ||
And foo is anything but null | ||
And bar is anything but null | ||
And foobar is anything but null | ||
And foobar is before field bar | ||
And bar is before field foo | ||
Then the following data should be generated: | ||
| foobar | foo | bar | | ||
| 0001-01-01T00:00:00.000Z | 0001-01-01T00:00:00.002Z | 0001-01-01T00:00:00.001Z | | ||
|
||
Scenario: Running linked "before" constraint with lower limit | ||
Given the generator can generate at most 1 rows | ||
And foo is anything but null | ||
And bar is anything but null | ||
And foobar is anything but null | ||
And foobar is before 2019-01-01T00:00:00.000Z | ||
And foobar is before field bar | ||
And bar is before field foo | ||
Then the following data should be generated: | ||
| foobar | foo | bar | | ||
| 0001-01-01T00:00:00.000Z | 0001-01-01T00:00:00.002Z | 0001-01-01T00:00:00.001Z | | ||
|
||
Scenario: Running linked "equalTo" constraint | ||
Given the generator can generate at most 1 rows | ||
And foo is anything but null | ||
And bar is anything but null | ||
And foobar is anything but null | ||
And foobar is equal to field bar | ||
And bar is equal to field foo | ||
Then the following data should be generated: | ||
| foobar | foo | bar | | ||
| 0001-01-01T00:00:00.000Z | 0001-01-01T00:00:00.000Z | 0001-01-01T00:00:00.000Z | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.