Inheritance: IGremlinClient
コード例 #1
0
 public void VShouldEumerateAllVertexes()
 {
     var client = Substitute.For<IGraphClient>();
     var gremlinClient = new GremlinClient(client);
     var query = gremlinClient.V;
     Assert.AreEqual("g.V", query.QueryText);
 }
コード例 #2
0
        public void VShouldCombineWithGremlinCount()
        {
            var client = Substitute.For<IGraphClient>();
            client
                .ExecuteScalarGremlin("g.V.count()", Arg.Is((IDictionary<string, object> d) => d.Count == 0))
                .Returns("123");

            var gremlinClient = new GremlinClient(client);
            client.Gremlin.Returns(gremlinClient);

            var result = gremlinClient.V.GremlinCount();
            Assert.AreEqual(123, result);
        }