You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
packagetestassertj;
importorg.assertj.core.api.AbstractObjectAssert;
importorg.assertj.core.util.Objects;
/** * {@link TemplateClassField} specific assertions - Generated by CustomAssertionGenerator. */@javax.annotation.Generated(value="assertj-assertions-generator")
publicclassTemplateClassFieldAssertextendsAbstractObjectAssert<TemplateClassFieldAssert, TemplateClassField> {
/** * Creates a new <code>{@link TemplateClassFieldAssert}</code> to make assertions on actual TemplateClassField. * @param actual the TemplateClassField we want to make assertions on. */publicTemplateClassFieldAssert(TemplateClassFieldactual) {
super(actual, TemplateClassFieldAssert.class);
}
/** * An entry point for TemplateClassFieldAssert to follow AssertJ standard <code>assertThat()</code> statements.<br> * With a static import, one can write directly: <code>assertThat(myTemplateClassField)</code> and get specific assertion with code completion. * @param actual the TemplateClassField we want to make assertions on. * @return a new <code>{@link TemplateClassFieldAssert}</code> */@org.assertj.core.util.CheckReturnValuepublicstaticTemplateClassFieldAssertassertThat(TemplateClassFieldactual) {
returnnewTemplateClassFieldAssert(actual);
}
/** * Verifies that the actual TemplateClassField's model is equal to the given one. * @param model the given model to compare the actual TemplateClassField's model to. * @return this assertion object. * @throws AssertionError - if the actual TemplateClassField's model is not equal to the given one. */publicTemplateClassFieldAsserthasModel(Tmodel) {
// check that actual TemplateClassField we want to make assertions on is not null.isNotNull();
// overrides the default error message with a more explicit oneStringassertjErrorMessage = "\nExpecting model of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe checkTactualModel = actual.getModel();
if (!Objects.areEqual(actualModel, model)) {
failWithMessage(assertjErrorMessage, actual, model, actualModel);
}
// return the current assertion for method chainingreturnthis;
}
}
Compilation fails on public TemplateClassFieldAssert hasModel(T model) { method:
[ERROR] /C:/java/myproject/target/generated-test-sources/assertj-assertions/testassertj/TemplateClassFieldAssert.java:[37,44] cannot find symbol
[ERROR] symbol: class T
[ERROR] location: class testassertj.TemplateClassFieldAssert
Expected behaviour:
Generated assert class is also <T> templated, so that hasModel(T model) compiles successfully.
The text was updated successfully, but these errors were encountered:
Generations plugin versions in maven:
Test class
Generated assertion class:
Compilation fails on
public TemplateClassFieldAssert hasModel(T model) {
method:Expected behaviour:
Generated assert class is also
<T>
templated, so thathasModel(T model)
compiles successfully.The text was updated successfully, but these errors were encountered: