You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Dan Haywood (JIRA)" <ji...@apache.org> on 2014/09/12 14:57:34 UTC
[jira] [Updated] (ISIS-563) Implement generic Spec Transformers for
BDD tests
[ https://issues.apache.org/jira/browse/ISIS-563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Haywood updated ISIS-563:
-----------------------------
Fix Version/s: (was: core-1.7.0)
core-2.0.0
> 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: Core
> Reporter: Oscar Bou
> Assignee: Oscar Bou
> Fix For: core-2.0.0
>
>
> 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
(v6.3.4#6332)