SWE/CS 332 In Class Exercise # 5
September 13, 2017
These exercises applies the contract model to JUnit tests. Work in groups.
As we noticed in our first in-class exercise,
is required to satisfy certain relationships.
Identify some of these relationships.
Write a JUnit theory that captures one of these properties.
Concoct a Java class that violates this property.
Populate the theory with appropriate data points (ignore JUnit syntax)
How many tests does your theory consider?
How many tests pass the precondition for your theory?
How many tests pass (or fail) the postcondition for your theory?