templates.custom_assertion_class_template.txt Maven / Gradle / Ivy
package ${package};
${imports}
/**
* {@link ${class_to_assert}} specific assertions - Generated by CustomAssertionGenerator.
*/
public class ${custom_assertion_class} extends AbstractAssert<${custom_assertion_class}, ${class_to_assert}> {
/**
* Creates a new {@link ${custom_assertion_class}}
to make assertions on actual ${class_to_assert}.
* @param actual the ${class_to_assert} we want to make assertions on.
*/
public ${custom_assertion_class}(${class_to_assert} actual) {
super(actual, ${custom_assertion_class}.class);
}
/**
* An entry point for ${custom_assertion_class} to follow AssertJ standard assertThat()
statements.
* With a static import, one can write directly: assertThat(my${class_to_assert})
and get specific assertion with code completion.
* @param actual the ${class_to_assert} we want to make assertions on.
* @return a new {@link ${custom_assertion_class}}
*/
public static ${custom_assertion_class} assertThat(${class_to_assert} actual) {
return new ${custom_assertion_class}(actual);
}