Summary
Comparison of enum with string fails with recursive assertion and strictTypeChecking as false. I would expect below code to be run successfully.
actual and expected objects and their fields were compared field by field recursively even if they were not of the same type - as per error, actual and expected values are same (CAR in below example) and test case should pass.
Example
public class TestEnumWithString {
@Test
public void testEnumWithString() {
assertThat(Vehicle.CAR).usingRecursiveComparison().isEqualTo("CAR");
}
}
enum Vehicle {
CAR
}
Summary
Comparison of enum with string fails with recursive assertion and
strictTypeCheckingas false. I would expect below code to be run successfully.actual and expected objects and their fields were compared field by field recursively even if they were not of the same type- as per error, actual and expected values are same (CAR in below example) and test case should pass.Example