Open
Description
This discussion begain in #57
We should adopt BDD Testing, atleast for complicated test cases, requiring some documentation.
The BDD specification would be like:
given: "An item is created"
when: "Item is disabled"
then: "Item does not contribute to the composition"
And the code would be like:
given: "An item is created"
def item = new Item()
verify {
item.enabled() == true
}
when: "Item is disabled"
item.setEnabled(false)
then: "Item does not contribute to the composition"
verifyAll {
item.isEnabled() == false
}
BDD tests can be written using the spock framework.
Spock also has an extension spock-reports that generates nice HTML test reports.
Metadata
Metadata
Assignees
Labels
No labels