示例#1
0
        public void EqualsSameObjectTest()
        {
            var token = new OperationToken(Operations.Multiplication);

            Assert.True(token.Equals(token));
            Assert.Equal(token, token);
        }
示例#2
0
        public void EqualsDiffTypeTest()
        {
            var token = new OperationToken(Operations.Multiplication);

            Assert.False(token.Equals(1));
            Assert.NotEqual((object)1, token);
        }
示例#3
0
        public void EqualsNullTest()
        {
            var token = new OperationToken(Operations.Multiplication);

            Assert.False(token.Equals(null));
            Assert.NotNull(token);
        }
示例#4
0
        public void EqualsDiffOperationTest()
        {
            var token1 = new OperationToken(Operations.Multiplication);
            var token2 = new OperationToken(Operations.Subtraction);

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