public void Should_Throw_ArgumentException_When_Invalid_Input()
        {
            var provider   = new LiteralTokenProvider(OperatorKeywords.Empty, StopCahracters.Empty);
            var expression = " name";

            Assert.Throws <ArgumentException>(() => provider.GetToken(0, expression));
        }
        public void Should_Return_OperatorToken_When_Stop_Token_Appears()
        {
            var provider   = new LiteralTokenProvider(OperatorKeywords.Basic, StopCahracters.Basic);
            var expression = "contains(";
            var result     = provider.GetToken(0, expression);

            Assert.Equal(0, result.StartIndex);
            Assert.Equal(7, result.EndIndex);
            Assert.Equal("contains", result.Token.Value);
            Assert.IsType <OperatorToken>(result.Token);
        }
        public void Should_Return_FieldToken_At_End()
        {
            var provider   = new LiteralTokenProvider(OperatorKeywords.Empty, StopCahracters.Empty);
            var expression = "name";
            var result     = provider.GetToken(0, expression);

            Assert.Equal(0, result.StartIndex);
            Assert.Equal(3, result.EndIndex);
            Assert.Equal("name", result.Token.Value);
            Assert.IsType <FieldToken>(result.Token);
        }