Skip to content

Commit

Permalink
fix relationships assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Feb 9, 2024
1 parent be2e182 commit 69af969
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ public class <%= persistClass %>Asserts {
* @param actual the actual entity
*/
public static void assert<%- persistClass %>UpdatableRelationshipsEquals(<%- persistClass %> expected, <%- persistClass %> actual) {
<%_ if (relationships.some(relationship => !relationship.autoGenerate && !relationship.otherEntity.builtInUser)) { _%>
<%_ if (relationships.some(relationship => relationship.persistableRelationship && !relationship.id && !relationship.autoGenerate && !relationship.otherEntity.builtInUser)) { _%>
assertThat(expected)
.as("Verify <%- persistClass %> relationships")
<%_ for (const relationship of relationships.filter(relationship => !relationship.autoGenerate && !relationship.otherEntity.builtInUser)) { _%>
<%_ for (const relationship of relationships.filter(relationship => relationship.persistableRelationship && !relationship.id && !relationship.autoGenerate && !relationship.otherEntity.builtInUser)) { _%>
.satisfies(e -> assertThat(e.get<%- relationship.propertyJavaBeanName %>()).as("check <%- relationship.propertyName %>").isEqualTo(actual.get<%- relationship.propertyJavaBeanName %>()))
<%_ } _%>
;
Expand Down

0 comments on commit 69af969

Please sign in to comment.