Skip to content

Commit

Permalink
#728 Added an extra property for the collision expression.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikependon committed Mar 12, 2021
1 parent f2e1615 commit b6517d6
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class QueryGroupEqualityTest
private class EntityClass
{
public int Id { get; set; }
public int Value { get; set; }
public string Name { get; set; }
}

Expand Down Expand Up @@ -119,8 +120,8 @@ public void TestQueryGroupHashCodeEqualityForExpressions()
public void TestQueryGroupHashCodeEqualityForCollidedExpressions()
{
// Prepare
var objA = QueryGroup.Parse<EntityClass>(c => c.Id == 1 && c.Id != 1);
var objB = QueryGroup.Parse<EntityClass>(c => c.Id != 1 && c.Id == 1);
var objA = QueryGroup.Parse<EntityClass>(c => c.Id == 1 && c.Value != 1);
var objB = QueryGroup.Parse<EntityClass>(c => c.Id != 1 && c.Value == 1);

// Act
var equal = (objA.GetHashCode() == objB.GetHashCode());
Expand Down Expand Up @@ -429,8 +430,8 @@ public void TestQueryGroupObjectEqualityForExpressions()
public void TestQueryGroupObjectEqualityForCollidedExpressions()
{
// Prepare
var objA = QueryGroup.Parse<EntityClass>(c => c.Id == 1 && c.Id != 1);
var objB = QueryGroup.Parse<EntityClass>(c => c.Id != 1 && c.Id == 1);
var objA = QueryGroup.Parse<EntityClass>(c => c.Id == 1 && c.Value != 1);
var objB = QueryGroup.Parse<EntityClass>(c => c.Id != 1 && c.Value == 1);

// Act
var equal = (objA == objB);
Expand Down Expand Up @@ -739,8 +740,8 @@ public void TestQueryGroupObjectEqualityViaEqualsMethodForExpressions()
public void TestQueryGroupObjectEqualityViaEqualsMethodForCollidedExpressions()
{
// Prepare
var objA = QueryGroup.Parse<EntityClass>(c => c.Id == 1 && c.Id != 1);
var objB = QueryGroup.Parse<EntityClass>(c => c.Id != 1 && c.Id == 1);
var objA = QueryGroup.Parse<EntityClass>(c => c.Id == 1 && c.Value != 1);
var objB = QueryGroup.Parse<EntityClass>(c => c.Id != 1 && c.Value == 1);

// Act
var equal = Equals(objA, objB);
Expand Down Expand Up @@ -1063,8 +1064,8 @@ public void TestQueryGroupArrayListContainabilityForExpressions()
public void TestQueryGroupArrayListContainabilityForCollidedExpressions()
{
// Prepare
var objA = QueryGroup.Parse<EntityClass>(c => c.Id == 1 && c.Id != 1);
var objB = QueryGroup.Parse<EntityClass>(c => c.Id != 1 && c.Id == 1);
var objA = QueryGroup.Parse<EntityClass>(c => c.Id == 1 && c.Value != 1);
var objB = QueryGroup.Parse<EntityClass>(c => c.Id != 1 && c.Value == 1);
var list = new ArrayList();

// Act
Expand Down Expand Up @@ -1411,8 +1412,8 @@ public void TestQueryGroupGenericListContainabilityForExpressions()
public void TestQueryGroupGenericListContainabilityForCollidedExpressions()
{
// Prepare
var objA = QueryGroup.Parse<EntityClass>(c => c.Id == 1 && c.Id != 1);
var objB = QueryGroup.Parse<EntityClass>(c => c.Id != 1 && c.Id == 1);
var objA = QueryGroup.Parse<EntityClass>(c => c.Id == 1 && c.Value != 1);
var objB = QueryGroup.Parse<EntityClass>(c => c.Id != 1 && c.Value == 1);
var list = new List<QueryGroup>();

// Act
Expand Down

0 comments on commit b6517d6

Please sign in to comment.