public void ShouldReadTokens(string query, object expectedKind, object expectedValue)
        {
            // Given
            var reader = new QueryTokenReader(query);

            // When
            var token = reader.ReadNext();

            // Then
            Assert.IsNotNull(token);
            Assert.AreEqual(expectedKind, token.Kind);
            Assert.AreEqual(expectedValue, token.Value);
        }
        public void ShouldReadComplexQuery()
        {
            // Given
            var reader = new QueryTokenReader("eq('Company', 'Abc'), lt('Price', 100)");

            // When & Then

            Assert.IsTrue(reader.CanRead());
            var token = reader.ReadNext();

            Assert.IsNotNull(token);
            Assert.AreEqual(QueryTokenKind.Identifier, token.Kind);
            Assert.AreEqual("eq", token.Value);

            Assert.IsTrue(reader.CanRead());
            token = reader.ReadNext();
            Assert.IsNotNull(token);
            Assert.AreEqual(QueryTokenKind.OpenBracket, token.Kind);
            Assert.AreEqual('(', token.Value);

            Assert.IsTrue(reader.CanRead());
            token = reader.ReadNext();
            Assert.IsNotNull(token);
            Assert.AreEqual(QueryTokenKind.String, token.Kind);
            Assert.AreEqual("Company", token.Value);

            Assert.IsTrue(reader.CanRead());
            token = reader.ReadNext();
            Assert.IsNotNull(token);
            Assert.AreEqual(QueryTokenKind.ArgumentSeparator, token.Kind);
            Assert.AreEqual(',', token.Value);

            Assert.IsTrue(reader.CanRead());
            token = reader.ReadNext();
            Assert.IsNotNull(token);
            Assert.AreEqual(QueryTokenKind.String, token.Kind);
            Assert.AreEqual("Abc", token.Value);

            Assert.IsTrue(reader.CanRead());
            token = reader.ReadNext();
            Assert.IsNotNull(token);
            Assert.AreEqual(QueryTokenKind.CloseBracket, token.Kind);
            Assert.AreEqual(')', token.Value);

            Assert.IsTrue(reader.CanRead());
            token = reader.ReadNext();
            Assert.IsNotNull(token);
            Assert.AreEqual(QueryTokenKind.ArgumentSeparator, token.Kind);
            Assert.AreEqual(',', token.Value);

            Assert.IsTrue(reader.CanRead());
            token = reader.ReadNext();
            Assert.IsNotNull(token);
            Assert.AreEqual(QueryTokenKind.Identifier, token.Kind);
            Assert.AreEqual("lt", token.Value);

            Assert.IsTrue(reader.CanRead());
            token = reader.ReadNext();
            Assert.IsNotNull(token);
            Assert.AreEqual(QueryTokenKind.OpenBracket, token.Kind);
            Assert.AreEqual('(', token.Value);

            Assert.IsTrue(reader.CanRead());
            token = reader.ReadNext();
            Assert.IsNotNull(token);
            Assert.AreEqual(QueryTokenKind.String, token.Kind);
            Assert.AreEqual("Price", token.Value);

            Assert.IsTrue(reader.CanRead());
            token = reader.ReadNext();
            Assert.IsNotNull(token);
            Assert.AreEqual(QueryTokenKind.ArgumentSeparator, token.Kind);
            Assert.AreEqual(',', token.Value);

            Assert.IsTrue(reader.CanRead());
            token = reader.ReadNext();
            Assert.IsNotNull(token);
            Assert.AreEqual(QueryTokenKind.Integer, token.Kind);
            Assert.AreEqual(100, token.Value);

            Assert.IsTrue(reader.CanRead());
            token = reader.ReadNext();
            Assert.IsNotNull(token);
            Assert.AreEqual(QueryTokenKind.CloseBracket, token.Kind);
            Assert.AreEqual(')', token.Value);

            Assert.IsFalse(reader.CanRead());
            token = reader.ReadNext();
            Assert.IsNull(token);
        }