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();
 }