For boolean properties, support "hasPropertyName(boolean expectedValue)"
Currently if a class has a boolean field / property (say hideLegend, the assertion generator produces two methods: isHideLegend() and isNotHideLegend. It would be really helpful to have an additional method hasHideLegend(boolean expectedValue). To keep with the BooleanAssert pattern, this might become hasHideLegendEqualTo(boolean) and hasHideLegendNotEqualTo(boolean). This is demonstrated by the example below:
private void testHelperMethod(MyAssertionClass instanceUnderTest, SomeInput input){
boolean expectedHasLegend = // some code that uses input to determine expected legend;
MyAssertionClassAssert assert = Assertions.assertThat(instanceUnderTest);
if (expectedHadLengeng)
assert.isHideLegend();
else
assert.isNotHideLegend();
}
The above could become:
private void testHelperMethod(MyAssertionClass instanceUnderTest, SomeInput input){
boolean expectedHasLegend = // some code that uses input to determine expected legend;
Assertions.assertThat(instanceUnderTest)
hasHideLegend(expectedHasLegend );
}
This possible by changing the templates used to generate the assertions, see http://joel-costigliola.github.io/assertj/assertj-assertions-generator-maven-plugin.html#custom-templates.
In your case you would need to change these ones:
<booleanAssertion>my_boolean_assert_template.txt</booleanAssertion>
<booleanWrapperAssertion>my_Boolean_wrapper_assert_template.txt</booleanWrapperAssertion>
The easiest way to define your templates is to start from the existing ones available here: https://github.com/joel-costigliola/assertj-assertions-generator/tree/master/src/main/resources/templates