Open
Description
The assertEquals
functions for primitives only accepts a primitive as the result parameter. I would like to be able to pass a primitive supplier into the result argument so that we can go from something like this:
@Test
public void testExample() {
assertEquals(123, someIntSupplier.getAsInt());
}
To something like this:
@Test
public void testExample() {
assertEquals(123, someIntSupplier);
}
By doing this, we would be mirroring the functionality that is currently present in the assertTrue
and assertFalse
methods. It could be trivially implemented by making it a wrapper call for the already existing primitive assertEquals methods.