System.Tests.ConsoleKeyInfoTests.Equals_SameData C# (CSharp) Method

Equals_SameData() private method

private Equals_SameData ( ConsoleKeyInfo cki ) : void
cki ConsoleKeyInfo
return void
        public void Equals_SameData(ConsoleKeyInfo cki)
        {
            ConsoleKeyInfo other = cki; // otherwise compiler warns about comparing the instance with itself

            Assert.True(cki.Equals((object)other));
            Assert.True(cki.Equals(other));
            Assert.True(cki == other);
            Assert.False(cki != other);

            Assert.Equal(cki.GetHashCode(), other.GetHashCode());
        }