Test Body Is Somewhere Else
Definition:
When the test method calls another method entirely with no other implementation in the test method – often a sign of missing parameterised test
Code Example:
@Test
public void hasCorrectFoo() {
checkFoo();
}
private static checkFoo() {
Foo foo = service.getFoo();
assertThat(foo.getBar()).isEqualTo("baz");
}
References:
Quality attributes
- Code Example
- Cause and Effect
- Frequency
- Refactoring