I am trying to Assert the 2 dates value and getting failed as
org.opentest4j.AssertionFailedError: expected: "2022-08-17" but was: "2022-08-17 00:00:00"
i used the below code Assertions.assertThat(appointmentDate).isEqualTo(Resappdate);
CodePudding user response:
The dates you are comparing should be in the same format.
In order to compare these date objects you need to transform the first date into the format of the second date or vise versa.