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

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

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

            bool result = subject.Equals(subject);

            Assert.IsTrue(result);
        }
Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo 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);
        }