public void SystemTokenThrows()
 {
     RemoveWildcardVisitor visitor = new RemoveWildcardVisitor();
     SystemToken token = new SystemToken(ExpressionConstants.It, null);
     Action visitSystemToken = () => token.Accept(visitor);
     visitSystemToken.ShouldThrow<NotSupportedException>().WithMessage(Strings.ALinq_IllegalSystemQueryOption(ExpressionConstants.It));
 }
 public void SystemTokenThrows()
 {
     RemoveWildcardVisitor visitor = new RemoveWildcardVisitor();
     SystemToken token = new SystemToken(ExpressionConstants.It, null);
     Action visitSystemToken = () => token.Accept(visitor);
     visitSystemToken.ShouldThrow<NotSupportedException>().WithMessage(Strings.ALinq_IllegalSystemQueryOption(ExpressionConstants.It));
 }
 public void PathWithoutWildcardIsInvariant()
 {
     RemoveWildcardVisitor visitor = new RemoveWildcardVisitor();
     NonSystemToken token = new NonSystemToken("stuff", null, null);
     token.Accept(visitor);
     token.Identifier.Should().Be("stuff");
     token.NextToken.Should().BeNull();
 }
 public void WildcardIsRemoved()
 {
     RemoveWildcardVisitor visitor = new RemoveWildcardVisitor();
     NonSystemToken token = new NonSystemToken("stuff", null, new NonSystemToken("*", null, null));
     token.Accept(visitor);
     token.Identifier.Should().Be("stuff");
     token.NextToken.Should().BeNull();
 }
 public void PathWithoutWildcardIsInvariant()
 {
     RemoveWildcardVisitor visitor = new RemoveWildcardVisitor();
     NonSystemToken token = new NonSystemToken("stuff", null, null);
     token.Accept(visitor);
     token.Identifier.Should().Be("stuff");
     token.NextToken.Should().BeNull();
 }
 public void WildcardIsRemoved()
 {
     RemoveWildcardVisitor visitor = new RemoveWildcardVisitor();
     NonSystemToken token = new NonSystemToken("stuff", null, new NonSystemToken("*", null, null));
     token.Accept(visitor);
     token.Identifier.Should().Be("stuff");
     token.NextToken.Should().BeNull();
 }
Example #7
0
        public void WildcardIsRemoved()
        {
            RemoveWildcardVisitor visitor = new RemoveWildcardVisitor();
            NonSystemToken        token   = new NonSystemToken("stuff", null, new NonSystemToken("*", null, null));

            token.Accept(visitor);
            Assert.Equal("stuff", token.Identifier);
            Assert.Null(token.NextToken);
        }
Example #8
0
        public void SystemTokenThrows()
        {
            RemoveWildcardVisitor visitor   = new RemoveWildcardVisitor();
            SystemToken           token     = new SystemToken(ExpressionConstants.It, null);
            Action visitSystemToken         = () => token.Accept(visitor);
            NotSupportedException exception = Assert.Throws <NotSupportedException>(visitSystemToken);

            Assert.Equal(Strings.ALinq_IllegalSystemQueryOption(ExpressionConstants.It), exception.Message);
        }
Example #9
0
        public void PathWithoutWildcardIsInvariant()
        {
            RemoveWildcardVisitor visitor = new RemoveWildcardVisitor();
            NonSystemToken        token   = new NonSystemToken("stuff", null, null);

            token.Accept(visitor);

            Assert.Equal("stuff", token.Identifier);
            Assert.Null(token.NextToken);
        }