Creating partial tests
By default, creation of partial tests is enabled in the Diffblue Cover Plugin for IntelliJ. This page covers partial tests and their uses, and how to turn off this option.
Last updated
Was this helpful?
Was this helpful?
@Test
public void testIncrement() {
// TODO: This test is incomplete.
// Reason: R002 Missing observers.
// Diffblue Cover was unable to create an assertion.
// Add getters for the following fields or make them package-private:
// MyClass.x
// Arrange
MyClass m = new MyClass();
// Act
m.increment();
}public class MyClass {
private int x;
public void increment() {
++x;
}
public int getX() {
return x;
}
}