Esempio n. 1
0
        public void Equals_OtherNull_ReturnsFalse()
        {
            MethodCallInfo subject = CreateSubject(() => Console.WriteLine());

            bool result = subject.Equals(default(MethodCallInfo));

            Assert.IsFalse(result);
        }
Esempio n. 2
0
        public void Equals_OtherSameInstance_ReturnsTrue()
        {
            MethodCallInfo subject = CreateSubject(() => Console.WriteLine());

            bool result = subject.Equals(subject);

            Assert.IsTrue(result);
        }
Esempio n. 3
0
        public void EqualsObject_OtherDifferentType_ReturnsFalse()
        {
            MethodCallInfo subject = CreateSubject(() => Console.WriteLine());
            object         other   = new StringBuilder();

            bool result = subject.Equals(other);

            Assert.IsFalse(result);
        }
Esempio n. 4
0
        public void EqualsObject_OtherDifferentMethod_ReturnsFalse()
        {
            MethodCallInfo subject = CreateSubject(() => Console.WriteLine());
            MethodCallInfo other   = CreateSubject(() => Console.ReadLine());

            bool result = subject.Equals((object)other);

            Assert.IsFalse(result);
        }
Esempio n. 5
0
        public void EqualsObject_OtherSameMethod_ReturnsTrue()
        {
            MethodCallInfo subject = CreateSubject(() => Console.WriteLine());
            MethodCallInfo other   = CreateSubject(() => Console.WriteLine());

            bool result = subject.Equals((object)other);

            Assert.IsTrue(result);
        }