Skip to content

Commit

Permalink
[Fix] broken unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
samatrhea committed Mar 17, 2023
1 parent 67d7b49 commit 68f6560
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions CDP4Common.NetCore.Tests/Poco/BinaryRelationshipTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,18 @@ public void VerifyThatAppliedRulesGetterWorks()
iteration.Relationship.Add(relationship);

// test
Assert.IsEmpty(relationship.AppliedBinaryRelationshipRules);
Assert.IsEmpty(relationship.QueryAppliedBinaryRelationshipRules());

relationship.Category.Add(cat3);
Assert.IsTrue(relationship.AppliedBinaryRelationshipRules.Contains(rule3));
Assert.IsTrue(relationship.QueryAppliedBinaryRelationshipRules().Contains(rule3));

relationship.Category.Add(cat1);
Assert.IsTrue(relationship.AppliedBinaryRelationshipRules.Contains(rule3));
Assert.IsTrue(relationship.AppliedBinaryRelationshipRules.Contains(rule1));
Assert.IsTrue(relationship.AppliedBinaryRelationshipRules.Contains(rule11));
Assert.IsTrue(relationship.QueryAppliedBinaryRelationshipRules().Contains(rule3));
Assert.IsTrue(relationship.QueryAppliedBinaryRelationshipRules().Contains(rule1));
Assert.IsTrue(relationship.QueryAppliedBinaryRelationshipRules().Contains(rule11));

relationship.Category = null;
Assert.IsEmpty(relationship.AppliedBinaryRelationshipRules);
Assert.IsEmpty(relationship.QueryAppliedBinaryRelationshipRules());
}
}
}
12 changes: 6 additions & 6 deletions CDP4Common.Tests/Poco/BinaryRelationshipTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,18 @@ public void VerifyThatAppliedRulesGetterWorks()
iteration.Relationship.Add(relationship);

// test
Assert.IsEmpty(relationship.AppliedBinaryRelationshipRules);
Assert.IsEmpty(relationship.QueryAppliedBinaryRelationshipRules());

relationship.Category.Add(cat3);
Assert.IsTrue(relationship.AppliedBinaryRelationshipRules.Contains(rule3));
Assert.IsTrue(relationship.QueryAppliedBinaryRelationshipRules().Contains(rule3));

relationship.Category.Add(cat1);
Assert.IsTrue(relationship.AppliedBinaryRelationshipRules.Contains(rule3));
Assert.IsTrue(relationship.AppliedBinaryRelationshipRules.Contains(rule1));
Assert.IsTrue(relationship.AppliedBinaryRelationshipRules.Contains(rule11));
Assert.IsTrue(relationship.QueryAppliedBinaryRelationshipRules().Contains(rule3));
Assert.IsTrue(relationship.QueryAppliedBinaryRelationshipRules().Contains(rule1));
Assert.IsTrue(relationship.QueryAppliedBinaryRelationshipRules().Contains(rule11));

relationship.Category = null;
Assert.IsEmpty(relationship.AppliedBinaryRelationshipRules);
Assert.IsEmpty(relationship.QueryAppliedBinaryRelationshipRules());
}
}
}

0 comments on commit 68f6560

Please sign in to comment.