public void EqualityHasValueSemantics() { var filter1 = new InclusiveFilter(_templateIds1); var filter2 = new InclusiveFilter(_templateIds2); var filter3 = new InclusiveFilter(_templateIds1); Assert.IsTrue(filter1.Equals(filter1)); Assert.IsTrue(filter1 == filter1); Assert.IsTrue(filter1.Equals(filter3)); Assert.IsTrue(filter1 == filter3); Assert.IsFalse(filter1.Equals(filter2)); Assert.IsTrue(filter1 != filter2); }
public void EqualityHasValueSemantics() { var filter = new InclusiveFilter(_templateIds); Assert.True(NoFilter.Instance.Equals(NoFilter.Instance)); Assert.True(NoFilter.Instance == NoFilter.Instance); Assert.False(NoFilter.Instance.Equals(filter)); Assert.False(filter.Equals(NoFilter.Instance)); Assert.True(NoFilter.Instance != filter); }