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 f6bce15 commit 382ee13
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1830,29 +1830,30 @@ _%>
public static void assertUpdated<%- persistClass %>Equals(<%- persistClass %> <%- persistInstance %>1, <%- persistClass %> <%- persistInstance %>2) {
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 %>())
() -> assertEquals(<%- persistInstance %>1.get<%- field.fieldInJavaBeanMethod %>(), <%- persistInstance %>2.get<%- field.fieldInJavaBeanMethod %>()),
<%_ if (field.fieldTypeBinary && !field.blobContentTypeText) { _%>
() -> assertEquals(<%- persistInstance %>1.get<%- field.fieldInJavaBeanMethod %>ContentType(), <%- persistInstance %>2.get<%- field.fieldInJavaBeanMethod %>ContentType())
() -> assertEquals(<%- persistInstance %>1.get<%- field.fieldInJavaBeanMethod %>ContentType(), <%- persistInstance %>2.get<%- field.fieldInJavaBeanMethod %>ContentType()),
<%_ } _%>
<%_ for (const relationship of relationships.filter(relationship => relationship.autoGenerate && !relationship.otherEntity.builtInUser)) { _%>
() -> assertEquals(<%- persistInstance %>1.get<%- relationship.propertyJavaBeanName %>(), <%- persistInstance %>2.get<%- relationship.propertyJavaBeanName %>())
() -> assertEquals(<%- persistInstance %>1.get<%- relationship.propertyJavaBeanName %>(), <%- persistInstance %>2.get<%- relationship.propertyJavaBeanName %>()),
<%_ } _%>
<%_ } _%>
);
assertInserted<%- persistClass %>Equals(<%- persistInstance %>1, <%- persistInstance %>2);
}

public static void assertInserted<%- persistClass %>Equals(<%- persistClass %> <%- persistInstance %>1, <%- persistClass %> <%- persistInstance %>2) {
assertAll("Verify properties",
<%_ for (const field of fields.filter(field => !field.transient && !field.autoGenerate)) { _%>
<%_ if (field.fieldTypeBigDecimal) { _%>
() -> assertEquals(<%- persistInstance %>1.get<%- field.fieldInJavaBeanMethod %>(), comparesEqualTo(<%- persistInstance %>2.get<%- field.fieldInJavaBeanMethod %>()))
() -> assertEquals(<%- persistInstance %>1.get<%- field.fieldInJavaBeanMethod %>(), comparesEqualTo(<%- persistInstance %>2.get<%- field.fieldInJavaBeanMethod %>())),
<%_ } else { _%>
<%_ if (field.fieldTypeBinary && !field.blobContentTypeText) { _%>
() -> assertEquals(<%- persistInstance %>1.get<%- field.fieldInJavaBeanMethod %>ContentType(), <%- persistInstance %>2.get<%- field.fieldInJavaBeanMethod %>ContentType())
() -> assertEquals(<%- persistInstance %>1.get<%- field.fieldInJavaBeanMethod %>ContentType(), <%- persistInstance %>2.get<%- field.fieldInJavaBeanMethod %>ContentType()),
<%_ } _%>
<%_ } _%>
<%_ for (const relationship of relationships.filter(relationship => !relationship.autoGenerate && !relationship.otherEntity.builtInUser)) { _%>
() -> assertEquals(<%- persistInstance %>1.get<%- relationship.propertyJavaBeanName %>(), <%- persistInstance %>2.get<%- relationship.propertyJavaBeanName %>())
() -> assertEquals(<%- persistInstance %>1.get<%- relationship.propertyJavaBeanName %>(), <%- persistInstance %>2.get<%- relationship.propertyJavaBeanName %>()),
<%_ } _%>
<%_ } _%>
);
Expand Down

0 comments on commit 382ee13

Please sign in to comment.