Ejemplo n.º 1
0
        public void GetAllRelationships2()
        {
            var node1 = Node.CreateNode();
            var node2 = Node.CreateNode();
            var node3 = Node.CreateNode();
            var node4 = Node.CreateNode();

            var restRelationship1 = node1.CreateRelationshipTo(node2, "like");
            var restRelationship2 = node1.CreateRelationshipTo(node3, "like");
            var restRelationship3 = node1.CreateRelationshipTo(node4, "like");

            var batch = new BatchStore();
            var batchRelationships = batch.GetRelationships(node1, RelationshipDirection.All);

            Assert.IsTrue(batch.Execute());

            var restRelationships = batch.GetGraphObject(batchRelationships);

            Assert.IsNotNull(restRelationships);

            Assert.IsTrue(restRelationships.Count() == 3);
        }
Ejemplo n.º 2
0
        public void GetAllRelationships2()
        {
            var node1 = Node.CreateNode();
            var node2 = Node.CreateNode();
            var node3 = Node.CreateNode();
            var node4 = Node.CreateNode();

            var restRelationship1 = node1.CreateRelationshipTo(node2, "like");
            var restRelationship2 = node1.CreateRelationshipTo(node3, "like");
            var restRelationship3 = node1.CreateRelationshipTo(node4, "like");

            var batch = new BatchStore();
            var batchRelationships = batch.GetRelationships(node1, RelationshipDirection.All);

            Assert.IsTrue(batch.Execute());

            var restRelationships = batch.GetGraphObject(batchRelationships);

            Assert.IsNotNull(restRelationships);

            Assert.IsTrue(restRelationships.Count() == 3);
        }