Sha256: b1bd949556fc9f8dd68bed16048c7896e9140bbe53625a660e1a3ae47b9255fa

Contents?: true

Size: 1.88 KB

Versions: 21

Compression:

Stored size: 1.88 KB

Contents

Feature: Tests the date_diff transform

  Background:
    Given the job is 'DateDiff'
    And the job source 'Source Data'
    And the job target 'Target Data'

    And the source 'Source Data'
    And the target 'Target Data'

  Scenario Outline: Calculating date difference in days2.
    Given the job parameter 'measure' is "days"
    And the source field 'Date1' has the value "<Date1>"
    And the source field 'Date2' has the value "<Date2>"
    Then the target field 'Difference' is set to the value "<Difference>"
    Examples:
      | Date1      | Date2      | Difference |
      | 2015-12-31 | 2016-01-02 | 2          |
      | 2014-12-31 | 2015-12-31 | 365        |
      | 2016-01-02 | 2015-12-31 | -2         |
      | 2015-02-28 | 2015-03-01 | 1          |
      | 2016-02-28 | 2016-03-01 | 2          | # leap day


  Scenario Outline: Calculating date difference in months.
    Given the job parameter 'measure' is "months"
    And the source field 'Date1' has the value "<Date1>"
    And the source field 'Date2' has the value "<Date2>"
    Then the target field 'Difference' is set to the value "<Difference>"
    Examples:
      | Date1      | Date2      | Difference |
      | 2015-12-31 | 2016-01-02 | 1          |
      | 2015-12-31 | 2016-02-02 | 2          |
      | 2015-12-31 | 2017-02-02 | 14         |
      | 2016-02-02 | 2015-12-31 | -2         |

  Scenario Outline: Calculating date difference in years.
    Given the job parameter 'measure' is "years"
    And the source field 'Date1' has the value "<Date1>"
    And the source field 'Date2' has the value "<Date2>"
    Then the target field 'Difference' is set to the value "<Difference>"
    Examples:
      | Date1      | Date2      | Difference |
      | 2015-12-31 | 2016-01-02 | 1          |
      | 2015-01-01 | 2015-12-31 | 0          |
      | 2015-12-31 | 2017-02-02 | 2          |
      | 2016-02-02 | 2015-12-31 | -1         |

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
remi-0.2.27 features/transforms/date_diff.feature
remi-0.2.26 features/transforms/date_diff.feature
remi-0.2.25 features/transforms/date_diff.feature
remi-0.2.24 features/transforms/date_diff.feature
remi-0.2.23 features/transforms/date_diff.feature
remi-0.2.22 features/transforms/date_diff.feature
remi-0.2.21 features/transforms/date_diff.feature
remi-0.2.20 features/transforms/date_diff.feature
remi-0.2.19 features/transforms/date_diff.feature
remi-0.2.18 features/transforms/date_diff.feature
remi-0.2.17 features/transforms/date_diff.feature
remi-0.2.16 features/transforms/date_diff.feature
remi-0.2.15 features/transforms/date_diff.feature
remi-0.2.14 features/transforms/date_diff.feature
remi-0.2.13 features/transforms/date_diff.feature
remi-0.2.12 features/transforms/date_diff.feature
remi-0.2.11 features/transforms/date_diff.feature
remi-0.2.10 features/transforms/date_diff.feature
remi-0.2.9 features/transforms/date_diff.feature
remi-0.2.8 lib/remi/project/features/transforms/date_diff.feature