Example #1
0
        public void Equals_Handles_Boxed_Instances()
        {
            var k1 = new WaitKey("foo", 2);
            var k2 = new WaitKey("foo", 2);

            Assert.True(k1.Equals((object)k2));
            Assert.True(k2.Equals((object)k1));
        }
Example #2
0
        public void Equals_Returns_False_When_Not_Equal()
        {
            var k1 = new WaitKey("foo", 2);
            var k2 = new WaitKey("bar", 3);

            Assert.False(k1.Equals(k2));
            Assert.False(k2.Equals(k1));
        }
Example #3
0
        public void Equals_Returns_False_When_Different_Type()
        {
            var k1 = new WaitKey("foo", 2);
            var k2 = "bar";

            Assert.False(k1.Equals(k2));
            Assert.False(k2.Equals(k1));
        }
Example #4
0
        public void Equals_Returns_True_When_Equal()
        {
            var k1 = new WaitKey("foo", 2);
            var k2 = new WaitKey("foo", 2);

            Assert.True(k1.Equals(k2));
            Assert.True(k2.Equals(k1));
        }