You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Daniel Keir Haywood (Jira)" <ji...@apache.org> on 2020/03/19 14:09:00 UTC

[jira] [Closed] (ISIS-563) [WON'T FIX] Implement generic Spec Transformers for BDD tests

     [ https://issues.apache.org/jira/browse/ISIS-563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Keir Haywood closed ISIS-563.
------------------------------------
    Resolution: Fixed

I'm closing this because, although it's probably quite easy, I'd rather we had a contribution for it or something tangible to drive its development.

> [WON'T FIX] Implement generic Spec Transformers for BDD tests
> -------------------------------------------------------------
>
>                 Key: ISIS-563
>                 URL: https://issues.apache.org/jira/browse/ISIS-563
>             Project: Isis
>          Issue Type: New Feature
>          Components: Isis Core
>            Reporter: Óscar Bou
>            Assignee: Daniel Keir Haywood
>            Priority: Major
>             Fix For: 2.0.0-M3
>
>
> 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"



--
This message was sent by Atlassian Jira
(v8.3.4#803005)