public void NotEqualToNull() { ProxyInstance mockProxy = new ProxyInstance(null); ProxyMethodPair pair1 = new ProxyMethodPair(mockProxy, endsWith); Assert.False(pair1.Equals(null)); }
public void CtorValueReturnedInProperties() { object mockProxy = new object(); // mock for the mocked, he he ProxyMethodPair pair = new ProxyMethodPair(mockProxy, endsWith); Assert.Same(mockProxy, pair.Proxy); Assert.Same(endsWith, pair.Method); }
public void NotEqualIfNotSameMethod() { ProxyInstance mockProxy = new ProxyInstance(null); ProxyMethodPair pair1 = new ProxyMethodPair(mockProxy, endsWith); ProxyMethodPair pair2 = new ProxyMethodPair(mockProxy, startsWith); Assert.NotEqual(pair1, pair2); Assert.NotEqual(pair2, pair1); //make sure that it works both ways }
public void EqualsToAnotherProxy() { ProxyInstance mockProxy = new ProxyInstance(null); ProxyMethodPair pair1 = new ProxyMethodPair(mockProxy, endsWith); ProxyMethodPair pair2 = new ProxyMethodPair(mockProxy, endsWith); Assert.Equal(pair1, pair2); Assert.Equal(pair2, pair1); //make sure that it works both ways }