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() { SelectExpandPathToStringVisitor visitor = new SelectExpandPathToStringVisitor(); SystemToken systemToken = new SystemToken(ExpressionConstants.It, null); Action visitSystemToken = () => systemToken.Accept(visitor); visitSystemToken.ShouldThrow <NotSupportedException>().WithMessage(Strings.ALinq_IllegalSystemQueryOption(ExpressionConstants.It)); }
public void SystemTokensThrowNotSupportedError() { AddNewEndingTokenVisitor visitor = new AddNewEndingTokenVisitor(new NonSystemToken("stuff", null, null)); 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); NotSupportedException exception = Assert.Throws <NotSupportedException>(visitSystemToken); Assert.Equal(Strings.ALinq_IllegalSystemQueryOption(ExpressionConstants.It), exception.Message); }
public void SystemTokenThrows() { SelectExpandPathToStringVisitor visitor = new SelectExpandPathToStringVisitor(); SystemToken systemToken = new SystemToken(ExpressionConstants.It, null); Action visitSystemToken = () => systemToken.Accept(visitor); NotSupportedException exception = Assert.Throws <NotSupportedException>(visitSystemToken); Assert.Equal(Strings.ALinq_IllegalSystemQueryOption(ExpressionConstants.It), exception.Message); }
public void SystemTokensThrowNotSupportedError() { AddNewEndingTokenVisitor visitor = new AddNewEndingTokenVisitor(new NonSystemToken("stuff", null, null)); 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); }
/// <summary> /// Translate a SystemToken, this is illegal so this always throws. /// </summary> /// <param name="tokenIn">The SystemToken to translate.</param> public void Visit(SystemToken tokenIn) { throw new NotSupportedException(Strings.ALinq_IllegalSystemQueryOption(tokenIn.Identifier)); }