@Retention(value=RUNTIME) public @interface GenerateAssertion
In the following example, assertions will be generated for thisIsAProperty, anotherProperty and getStuff (standard getter):
public class AnnotatedClass {
@GenerateAssertion
public boolean thisIsAProperty() {
return false;
}
public boolean thisIsNotAProperty() {
return false;
}
public boolean getStuff() {
return false;
}
@GenerateAssertion
public Object anotherProperty() {
return null;
}
}
In the next example, assertions will be generated for all methods
(standard getter):
@GenerateAssertion
public class AnnotatedClass {
public boolean thisIsAProperty() {
return false;
}
public boolean getStuff() {
return false;
}
public Object anotherProperty() {
return null;
}
}
Copyright © 2021 AssertJ. All rights reserved.