示例#1
0
        public void CountUsingICypderFluentQuery()
        {
            var client = Substitute.For<IRawGraphClient>();
            ICypherFluentQuery query = new CypherFluentQuery(client);

            var resultQuery =
                query.Return(() => new { Foo = All.Count() })
            .Query;

            Assert.AreEqual("RETURN count(*) AS Foo", resultQuery.QueryText);
            Assert.AreEqual(0, resultQuery.QueryParameters.Count());
        }
示例#2
0
        public void CountUsingICypderFluentQuery()
        {
            var client = Substitute.For <IRawGraphClient>();
            ICypherFluentQuery query = new CypherFluentQuery(client);

            var resultQuery =
                query.Return(() => new { Foo = All.Count() })
                .Query;

            Assert.AreEqual("RETURN count(*) AS Foo", resultQuery.QueryText);
            Assert.AreEqual(0, resultQuery.QueryParameters.Count());
        }