2828import javax .xml .datatype .XMLGregorianCalendar ;
2929
3030import org .approvaltests .Approvals ;
31- import org .assertj .core .api .Assertions ;
3231import org .junit .jupiter .api .Test ;
3332
33+ import static org .junit .jupiter .api .Assertions .assertEquals ;
34+
3435import org .springframework .util .StreamUtils ;
3536
37+ import org .apache .causeway .commons .io .TextUtils ;
3638import org .apache .causeway .schema .cmd .v2 .ActionDto ;
3739import org .apache .causeway .schema .cmd .v2 .CommandDto ;
3840import org .apache .causeway .schema .cmd .v2 .ParamDto ;
4446import org .apache .causeway .testing .integtestsupport .applib .ApprovalsOptions ;
4547
4648/**
47- * @implNote potential issues with ISO-8601 format equivalence of
48- * {@code 2026-07-01T08:15:30.000+00:00 == 2026-07-01T08:15:30.000Z},
49+ * @implNote potential issues with ISO-8601 format equivalence of
50+ * {@code 2026-07-01T08:15:30.000+00:00 == 2026-07-01T08:15:30.000Z},
4951 * tests might fail, because tests expect one or the other in a hardcoded way
5052 */
5153class CommandDtoUtils_toYaml_Approval_Test {
@@ -65,7 +67,7 @@ void marshals_all_date_time_datatypes_when_default_timezone_is_cest() {
6567 withDefaultTimeZone ("Europe/Paris" , () -> {
6668 String yaml = CommandDtoUtils .toMultiDocYaml (List .of (commandWithAllDateTimeParams ()));
6769 try {
68- Assertions . assertThat ( yaml ). isEqualTo (readApprovalSnapshot ());
70+ assertEquals ( TextUtils . readLines (readApprovalSnapshot ()), TextUtils . readLines ( yaml ));
6971 } catch (IOException ex ) {
7072 throw new RuntimeException (ex );
7173 }
@@ -168,5 +170,5 @@ private static DatatypeFactory datatypeFactory() {
168170 throw new RuntimeException ("Failed to initialize DatatypeFactory" , ex );
169171 }
170172 }
171-
173+
172174}
0 commit comments