示例#1
0
        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();
        }
示例#2
0
        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());
        }
示例#3
0
        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");
        }