public void TestEquality2() { const string id1 = "foo"; const string id2 = "bar"; var column = new CustomLogFileColumn <string>(id1); column.Equals(column).Should().BeTrue(); var otherColumn = new CustomLogFileColumn <string>(id2); column.Equals(otherColumn).Should().BeFalse(); }
public void TestEquality1() { const string id = "foo"; var column = new CustomLogFileColumn <string>(id); column.Equals(column).Should().BeTrue(); var equalColumn = new CustomLogFileColumn <string>(id); column.Equals(equalColumn).Should().BeTrue(); column.GetHashCode().Should().Be(equalColumn.GetHashCode()); }
public void TestEquality3() { var index = LogFileColumns.Index; var column = new CustomLogFileColumn <LogLineIndex>(index.Id); column.Equals(index).Should().BeFalse("because a well-known-column is fundamentally different from a custom column and thus the two may never be equal"); }