Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Feb 6, 2024
1 parent 41c176a commit 963c708
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1827,6 +1827,7 @@ _%>
<%_ } _%>

public static void assertUpdated<%- persistClass %>Equals(<%- persistClass %> <%- persistInstance %>1, <%- persistClass %> <%- persistInstance %>2) {
// prettier-ignore
assertAll("Verify properties",
<%_ for (const field of fields.filter(field => !field.transient && field.autoGenerate)) { _%>
() -> assertEquals(<%- persistInstance %>1.get<%- field.fieldInJavaBeanMethod %>(), <%- persistInstance %>2.get<%- field.fieldInJavaBeanMethod %>()),
Expand All @@ -1843,10 +1844,11 @@ _%>
}

public static void assertInserted<%- persistClass %>Equals(<%- persistClass %> <%- persistInstance %>1, <%- persistClass %> <%- persistInstance %>2) {
// prettier-ignore
assertAll("Verify properties",
<%_ for (const field of fields.filter(field => !field.transient && !field.autoGenerate)) { _%>
<%_ if (field.fieldTypeZonedDateTime) { _%>
() -> assertThat(<%- persistInstance %>1.get<%- field.fieldInJavaBeanMethod %>()).isEqualByComparingTo(<%- persistInstance %>2.get<%- field.fieldInJavaBeanMethod %>()),
() -> assertThat(<%- persistInstance %>1.get<%- field.fieldInJavaBeanMethod %>()).isAtSameInstantAs(<%- persistInstance %>2.get<%- field.fieldInJavaBeanMethod %>()),
<%_ } else if (field.fieldTypeBigDecimal) { _%>
() -> assertThat(<%- persistInstance %>1.get<%- field.fieldInJavaBeanMethod %>()).isEqualByComparingTo(<%- persistInstance %>2.get<%- field.fieldInJavaBeanMethod %>() == null ? null : <%- persistInstance %>2.get<%- field.fieldInJavaBeanMethod %>().stripTrailingZeros()),
<%_ } else { _%>
Expand Down

0 comments on commit 963c708

Please sign in to comment.