public void ParseNonDottedIdentifier()
        {
            var        tokenizer = GetFunctionCallParser("func()");
            QueryToken result    = tokenizer.ParseIdentifierAsFunction(null);

            result.ShouldBeFunctionCallToken("func").And.Arguments.Should().BeEmpty();
        }
        public void FunctionIdentifierParsedCorrectly()
        {
            var        tokenizer = GetIdentifierTokenizerWithRealFunctionParser("func()");
            QueryToken result    = tokenizer.ParseIdentifier(null);

            result.ShouldBeFunctionCallToken("func");
        }
        public void ParseManyDottedIdentifier()
        {
            var        tokenizer = GetFunctionCallParser("one.two.three.four.five.six()");
            QueryToken result    = tokenizer.ParseIdentifierAsFunction(null);

            result.ShouldBeFunctionCallToken("one.two.three.four.five.six").And.Arguments.Should().BeEmpty();
        }
        public void FunctionWithOneArgument()
        {
            var        tokenizer = GetFunctionCallParser("func(1)");
            QueryToken result    = tokenizer.ParseIdentifierAsFunction(null);

            result.ShouldBeFunctionCallToken("func")
            .And.Arguments.Should().HaveCount(1);
        }
        public void ParsedFunctionWithAParent()
        {
            var        tokenizer = GetFunctionCallParser("func()");
            var        parent    = new InnerPathToken("Customer", null, null);
            QueryToken result    = tokenizer.ParseIdentifierAsFunction(parent);

            result.ShouldBeFunctionCallToken("func").And.Source.Should().BeSameAs(parent);
        }
        public void FunctionCallWithNamedArguments()
        {
            var        tokenizer = GetFunctionCallParser("func(stuff=1, morestuff=2)");
            QueryToken result    = tokenizer.ParseIdentifierAsFunction(null);

            result.ShouldBeFunctionCallToken("func")
            .And.Arguments.Should().HaveCount(2);
        }
        public void ParsedFunctionWithAParentAndArgs()
        {
            var        tokenizer         = GetFunctionCallParser("func(x='blah')");
            var        parent            = new InnerPathToken("Customer", null, null);
            QueryToken result            = tokenizer.ParseIdentifierAsFunction(parent);
            var        functionCallToken = result.ShouldBeFunctionCallToken("func").And;

            functionCallToken.Source.Should().BeSameAs(parent);
            functionCallToken.Arguments.Should().HaveCount(1);
        }