public void ProductEqualityComparer_List_IsValid(IEnumerable <ProductModel> list, int expectedLength) { // Arrange var comparer = new ProductModelComparer(); // Act var actual = list.Distinct(comparer); // Assert Assert.Equal(expectedLength, actual.Count()); }
public void ProductEqualityComparer_Objects_IsValid(ProductModel product1, ProductModel product2, bool expected) { // Arrange var comparer = new ProductModelComparer(); // Act var actual = comparer.Equals(product1, product2); // Assert Assert.Equal(expected, actual); }