public Equals ( object obj ) : bool | ||
obj | object | The object to compare with the current object. |
Результат | bool |
public void EqualsSameObjectTest() { var token = new UserFunctionToken("x"); Assert.True(token.Equals(token)); Assert.Equal(token, token); }
public void EqualsDiffTypeTest() { var token = new UserFunctionToken("x"); Assert.False(token.Equals(1)); Assert.NotEqual((object)1, token); }
public void EqualsNullTest() { var token = new UserFunctionToken("x"); Assert.False(token.Equals(null)); Assert.NotEqual(null, token); }
public void EqualsDiffFuncTest() { var token1 = new UserFunctionToken("x"); var token2 = new UserFunctionToken("y"); Assert.False(token1.Equals(token2)); Assert.NotEqual(token1, token2); }