Beispiel #1
0
        public void EqualsSameObjectTest()
        {
            var token = new VariableToken("x");

            Assert.True(token.Equals(token));
            Assert.Equal(token, token);
        }
Beispiel #2
0
        public void EqualsNullTest()
        {
            var token = new VariableToken("x");

            Assert.False(token.Equals(null));
            Assert.NotEqual(null, token);
        }
Beispiel #3
0
        public void EqualsDiffTypeTest()
        {
            var token = new VariableToken("x");

            Assert.False(token.Equals(1));
            Assert.NotEqual((object)1, token);
        }
Beispiel #4
0
        public void EqualsDiffVarTest()
        {
            var token1 = new VariableToken("x");
            var token2 = new VariableToken("y");

            Assert.False(token1.Equals(token2));
            Assert.NotEqual(token1, token2);
        }