public void Equals_OtherNull_ReturnsFalse() { MethodCallInfo subject = CreateSubject(() => Console.WriteLine()); bool result = subject.Equals(default(MethodCallInfo)); Assert.IsFalse(result); }
public void Equals_OtherSameInstance_ReturnsTrue() { MethodCallInfo subject = CreateSubject(() => Console.WriteLine()); bool result = subject.Equals(subject); Assert.IsTrue(result); }
public void EqualsObject_OtherDifferentType_ReturnsFalse() { MethodCallInfo subject = CreateSubject(() => Console.WriteLine()); object other = new StringBuilder(); bool result = subject.Equals(other); Assert.IsFalse(result); }
public void EqualsObject_OtherDifferentMethod_ReturnsFalse() { MethodCallInfo subject = CreateSubject(() => Console.WriteLine()); MethodCallInfo other = CreateSubject(() => Console.ReadLine()); bool result = subject.Equals((object)other); Assert.IsFalse(result); }
public void EqualsObject_OtherSameMethod_ReturnsTrue() { MethodCallInfo subject = CreateSubject(() => Console.WriteLine()); MethodCallInfo other = CreateSubject(() => Console.WriteLine()); bool result = subject.Equals((object)other); Assert.IsTrue(result); }