Skip to content

Commit 4326c77

Browse files
author
ahuber@apache.org
committed
fixes EOL sensitive test
1 parent f417467 commit 4326c77

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

core/mmtest/src/test/java/org/apache/causeway/applib/util/schema/CommandDtoUtils_toYaml_Approval_Test.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@
2828
import javax.xml.datatype.XMLGregorianCalendar;
2929

3030
import org.approvaltests.Approvals;
31-
import org.assertj.core.api.Assertions;
3231
import org.junit.jupiter.api.Test;
3332

33+
import static org.junit.jupiter.api.Assertions.assertEquals;
34+
3435
import org.springframework.util.StreamUtils;
3536

37+
import org.apache.causeway.commons.io.TextUtils;
3638
import org.apache.causeway.schema.cmd.v2.ActionDto;
3739
import org.apache.causeway.schema.cmd.v2.CommandDto;
3840
import org.apache.causeway.schema.cmd.v2.ParamDto;
@@ -44,8 +46,8 @@
4446
import 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
*/
5153
class 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

Comments
 (0)