You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2026/04/22 11:34:00 UTC

(causeway) 08/08: JDOJPA-281 : fixes existing unit tests

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch JDOJPA-281
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit b10cea9bc5a7507aee76e385e41fd169aed532d4
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Apr 22 12:31:10 2026 +0100

    JDOJPA-281 : fixes existing unit tests
---
 ...ils_fromYaml_Test.commands-with-collection-param.yaml |  6 +++---
 ...oUtils_fromYaml_Test.commands-with-scalar-params.yaml |  2 +-
 .../util/schema/CommandDtoUtils_fromYaml_Test.java       | 16 ++++++++++++++++
 3 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/api/applib/src/test/java/org/apache/causeway/applib/util/schema/CommandDtoUtils_fromYaml_Test.commands-with-collection-param.yaml b/api/applib/src/test/java/org/apache/causeway/applib/util/schema/CommandDtoUtils_fromYaml_Test.commands-with-collection-param.yaml
index f2b7b6b3b5f..4175c718be9 100644
--- a/api/applib/src/test/java/org/apache/causeway/applib/util/schema/CommandDtoUtils_fromYaml_Test.commands-with-collection-param.yaml
+++ b/api/applib/src/test/java/org/apache/causeway/applib/util/schema/CommandDtoUtils_fromYaml_Test.commands-with-collection-param.yaml
@@ -73,13 +73,13 @@
           type: "collection"
           "null": false
           name: "Lease Item Types"
-        - localDate: "2026-06-30T22:00:00.000+00:00"
+        - localDate: "2026-06-30"
           type: "localDate"
           name: "Invoice Due Date"
-        - localDate: "2026-06-30T22:00:00.000+00:00"
+        - localDate: "2026-06-30"
           type: "localDate"
           name: "Start Due Date"
-        - localDate: "2026-07-01T22:00:00.000+00:00"
+        - localDate: "2026-07-01"
           type: "localDate"
           name: "Next Due Date"
         - type: "string"
diff --git a/api/applib/src/test/java/org/apache/causeway/applib/util/schema/CommandDtoUtils_fromYaml_Test.commands-with-scalar-params.yaml b/api/applib/src/test/java/org/apache/causeway/applib/util/schema/CommandDtoUtils_fromYaml_Test.commands-with-scalar-params.yaml
index d88b314b5ec..81222d72ad7 100644
--- a/api/applib/src/test/java/org/apache/causeway/applib/util/schema/CommandDtoUtils_fromYaml_Test.commands-with-scalar-params.yaml
+++ b/api/applib/src/test/java/org/apache/causeway/applib/util/schema/CommandDtoUtils_fromYaml_Test.commands-with-scalar-params.yaml
@@ -22,7 +22,7 @@
   member: !<ACT>
     parameters:
       parameter:
-        - localDate: "2026-04-20T22:00:00.000+00:00"
+        - localDate: "2026-04-20"
           type: "localDate"
           name: "Invoice Date"
         - boolean: false
diff --git a/api/applib/src/test/java/org/apache/causeway/applib/util/schema/CommandDtoUtils_fromYaml_Test.java b/api/applib/src/test/java/org/apache/causeway/applib/util/schema/CommandDtoUtils_fromYaml_Test.java
index 2608b975d59..bf46b304166 100644
--- a/api/applib/src/test/java/org/apache/causeway/applib/util/schema/CommandDtoUtils_fromYaml_Test.java
+++ b/api/applib/src/test/java/org/apache/causeway/applib/util/schema/CommandDtoUtils_fromYaml_Test.java
@@ -68,6 +68,7 @@ public void scalarValues() throws IOException {
         Assertions.assertThat(invoiceDate.getName()).isEqualTo("Invoice Date");
         Assertions.assertThat(invoiceDate.getType()).isEqualTo(ValueType.LOCAL_DATE);
         Assertions.assertThat(invoiceDate.getLocalDate()).isNotNull();
+        Assertions.assertThat(invoiceDate.getLocalDate().toXMLFormat()).isEqualTo("2026-04-20");
 
         ParamDto allowFuture = scalarParams.get(1);
         Assertions.assertThat(allowFuture.getName()).isEqualTo("Allow Invoice Date In Future");
@@ -113,6 +114,21 @@ public void collectionValues() throws IOException {
         Assertions.assertThat(nullableTagName.getType()).isEqualTo(ValueType.STRING);
         Assertions.assertThat(nullableTagName.isNull()).isTrue();
 
+        ParamDto invoiceDueDate = params.get(2);
+        Assertions.assertThat(invoiceDueDate.getName()).isEqualTo("Invoice Due Date");
+        Assertions.assertThat(invoiceDueDate.getType()).isEqualTo(ValueType.LOCAL_DATE);
+        Assertions.assertThat(invoiceDueDate.getLocalDate().toXMLFormat()).isEqualTo("2026-06-30");
+
+        ParamDto startDueDate = params.get(3);
+        Assertions.assertThat(startDueDate.getName()).isEqualTo("Start Due Date");
+        Assertions.assertThat(startDueDate.getType()).isEqualTo(ValueType.LOCAL_DATE);
+        Assertions.assertThat(startDueDate.getLocalDate().toXMLFormat()).isEqualTo("2026-06-30");
+
+        ParamDto nextDueDate = params.get(4);
+        Assertions.assertThat(nextDueDate.getName()).isEqualTo("Next Due Date");
+        Assertions.assertThat(nextDueDate.getType()).isEqualTo(ValueType.LOCAL_DATE);
+        Assertions.assertThat(nextDueDate.getLocalDate().toXMLFormat()).isEqualTo("2026-07-01");
+
         ParamDto newTagName = params.get(6);
         Assertions.assertThat(newTagName.getName()).isEqualTo("New Tag Name");
         Assertions.assertThat(newTagName.getType()).isEqualTo(ValueType.STRING);