templates.custom_hierarchical_assertion_class_template.txt Maven / Gradle / Ivy
The newest version!
package ${package};
${imports}
/**
* {@link ${class_to_assert}} specific assertions - Generated by CustomAssertionGenerator.
*
* Although this class is not final to allow Soft assertions proxy, if you wish to extend it,
* extend {@link Abstract${custom_assertion_class}} instead.
*/
@javax.annotation.processing.Generated(value="assertj-assertions-generator")
public class ${custom_assertion_class} extends Abstract${custom_assertion_class}<${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}}
*/
@org.assertj.core.util.CheckReturnValue
public static ${custom_assertion_class} assertThat(${class_to_assert} actual) {
return new ${custom_assertion_class}(actual);
}
}