Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-563

[WON'T FIX] Implement generic Spec Transformers for BDD tests

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • 2.0.0-M3
    • Core
    • None

    Description

      If the user follows simple conventions when writing BDD tests, some inference can be done from them and a generic Spec Transformer can be used for deriving the Entity from the Gherkin's sentence.

      For example, on the following Glue, instead of capturing only the name of the employee, we can capture (employee with name \"[^\"]*\"):

      @When("The company's (employee with name \"[^\"]*\") has a role assigned")

      From there we know that:

      • The Domain Entity singular name is "employee", and Isis has the ability to derive the singular name form the Entity's class name, or specify it through the Isis "@Named" annotation.
      • We must search an Entity of the previous type by name.
      • The name must be equal to PETER.

      As the Domain Entity singular name must be explicitely used, it also reinforces the "Ubiquitous Language" on those BDD tests.

      We can admit some variants of the previous case, such as:

      • the employee with name "PETER"
      • the employee named "PETER"
      • the property with reference "REF-001"
      • the property referenced "REF-001"
      • the product with id "PR-001"

      Attachments

        Activity

          People

            danhaywood Daniel Keir Haywood
            oscarbou Óscar Bou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: