Over Exertion Assertion
Definition:
Where the implementation of an assertion is heavy and in the body of the test, rather than in an assertion library
Code Example:
List results = service.getFoosInOrder();
int previousOrder = results.get(0).getOrdering();
for(int i=0; i= because they can sometimes be of same value
if (!(ordering>=previousOrder)) {
Assert.fail("Not in ascending order");
}
previousOrder = ordering;
}
References:
Quality attributes
- Code Example
- Cause and Effect
- Frequency
- Refactoring