public void SutEqualsOtherObjectWithSameMethod() { var method = ((Action <object>) delegate { }).GetMethodInfo(); var sut = new StaticMethod(method); object other = new StaticMethod(method); // Act var result = sut.Equals(other); // Assert Assert.True(result); }
public void SutDoesNotEqualSomeOtherObject() { // Arrange var method = ((Action <object>) delegate { }).GetMethodInfo(); var sut = new StaticMethod(method); // Act var result = sut.Equals(new object()); // Assert Assert.False(result); }
public void SutEqualsOtherObjectWithSameMethod() { Action <object> action = o => { }; var method = action.GetMethodInfo(); var sut = new StaticMethod(method); object other = new StaticMethod(method); // Act var result = sut.Equals(other); // Assert Assert.True(result); }
public void SutDoesNotEqualSomeOtherObject() { // Arrange Action <object> action = o => { }; var method = action.GetMethodInfo(); var sut = new StaticMethod(method); // Act var result = sut.Equals(new object()); // Assert Assert.False(result); }
public void SutEqualsOtherObjectWithSameMethod() { var method = ((Action <object>) delegate { }).GetMethodInfo(); var sut = new StaticMethod(method); object other = new StaticMethod(method); // Exercise system var result = sut.Equals(other); // Verify outcome Assert.True(result); // Teardown }
public void SutDoesNotEqualSomeOtherObject() { // Fixture setup var method = ((Action <object>) delegate { }).GetMethodInfo(); var sut = new StaticMethod(method); // Exercise system var result = sut.Equals(new object()); // Verify outcome Assert.False(result); // Teardown }
public void SutDoesNotEqualNullSut() { // Fixture setup var method = ((Action <object>) delegate { }).Method; var sut = new StaticMethod(method); // Exercise system var result = sut.Equals((StaticMethod)null); // Verify outcome Assert.False(result); // Teardown }
public void SutEqualsOtherObjectWithSameMethodAndSameParameters() { var method = ((Action <object>) delegate { }).Method; var parameters = method.GetParameters(); var sut = new StaticMethod(method, parameters); object other = new StaticMethod(method, parameters); // Exercise system var result = sut.Equals(other); // Verify outcome Assert.True(result); // Teardown }
public void SutDoesNotEqualOtherObjectWithDifferentParameters() { // Arrange var method = ((Action <object>) delegate { }).GetMethodInfo(); var sut = new StaticMethod(method, method.GetParameters()); var otherParameters = ((Action <int>) delegate { }).GetMethodInfo().GetParameters(); object other = new StaticMethod(method, otherParameters); // Act var result = sut.Equals(other); // Assert Assert.False(result); }
public void SutDoesNotEqualOtherObjectWithDifferentParameters() { // Fixture setup var method = ((Action <object>) delegate { }).GetMethodInfo(); var sut = new StaticMethod(method, method.GetParameters()); var otherParameters = ((Action <int>) delegate { }).GetMethodInfo().GetParameters(); object other = new StaticMethod(method, otherParameters); // Exercise system var result = sut.Equals(other); // Verify outcome Assert.False(result); // Teardown }
public void SutDoesNotEqualOtherObjectWithDifferentMethod() { // Fixture setup var method = ((Action <object>) delegate { }).Method; var sut = new StaticMethod(method); var otherMethod = ((Action <int>) delegate { }).Method; object other = new StaticMethod(otherMethod); // Exercise system var result = sut.Equals(other); // Verify outcome Assert.False(result); // Teardown }
public void SutDoesNotEqualOtherObjectWithDifferentParameters() { // Arrange Action <object> action = o => { }; var method = action.GetMethodInfo(); var sut = new StaticMethod(method, method.GetParameters()); Action <int> otherAction = i => { }; var otherParameters = otherAction.GetMethodInfo().GetParameters(); object other = new StaticMethod(method, otherParameters); // Act var result = sut.Equals(other); // Assert Assert.False(result); }
public void SutEqualsOtherObjectWithSameMethodAndSameParameters() { var method = ((Action<object>)delegate { }).Method; var parameters = method.GetParameters(); var sut = new StaticMethod(method, parameters); object other = new StaticMethod(method, parameters); // Exercise system var result = sut.Equals(other); // Verify outcome Assert.True(result); // Teardown }
public void SutDoesNotEqualOtherObjectWithDifferentParameters() { // Fixture setup var method = ((Action<object>)delegate { }).Method; var sut = new StaticMethod(method, method.GetParameters()); var otherParameters = ((Action<int>)delegate { }).Method.GetParameters(); object other = new StaticMethod(method, otherParameters); // Exercise system var result = sut.Equals(other); // Verify outcome Assert.False(result); // Teardown }
public void SutDoesNotEqualSomeOtherObject() { // Fixture setup var method = ((Action<object>)delegate { }).Method; var sut = new StaticMethod(method); // Exercise system var result = sut.Equals(new object()); // Verify outcome Assert.False(result); // Teardown }