public void CreateNodeWithProperties() { var batch = new BatchStore(); var prop1 = new Properties(); prop1.SetProperty("name", "michael"); prop1.SetProperty("location", "new york"); var prop2 = new Properties(); prop2.SetProperty("color", "blue"); prop2.SetProperty("tree", "elm"); var batchNode1 = Node.CreateNode(prop1, batch); var batchNode2 = Node.CreateNode(prop2, batch); Assert.IsTrue(batch.Execute()); var restNode1 = batch.GetGraphObject(batchNode1); var restNode2 = batch.GetGraphObject(batchNode2); Assert.IsTrue(restNode1.Id > 0); Assert.IsTrue(restNode2.Id > 0 && restNode1.Id != restNode2.Id); Assert.IsTrue(restNode1.Properties.GetProperty <string>("name") == "michael"); Assert.IsTrue(restNode1.Properties.GetProperty <string>("location") == "new york"); Assert.IsTrue(restNode2.Properties.GetProperty <string>("color") == "blue"); Assert.IsTrue(restNode2.Properties.GetProperty <string>("tree") == "elm"); }
public void RemoveRelationshipProperties() { var node1 = Node.CreateNode(); var node2 = Node.CreateNode(); var batch = new BatchStore(); var batchRelationship = Relationship.CreateRelationship(node1, node2, "likes", null, batch); batchRelationship.Properties.SetProperty("name", "joe"); batchRelationship.Properties.SetProperty("age", 12); batchRelationship.SaveProperties(); batchRelationship.Properties.RemoveProperty("age"); batchRelationship.SaveProperties(); Assert.IsTrue(batch.Execute()); var restRelationship = batch.GetGraphObject(batchRelationship); Assert.IsTrue(restRelationship.Properties.GetProperty <string>("name") == "joe"); Assert.IsTrue(restRelationship.Properties.GetPropertyOrDefault <int>("age") == 0); }
public void GetRelationshipWithProperties() { var node1 = Node.CreateNode(); var node2 = Node.CreateNode(); var props = new Properties(); props.SetProperty("name", "michael"); props.SetProperty("approved", true); props.SetProperty("length", 123); var relationship = node1.CreateRelationshipTo(node2, "friend", props); var batch = new BatchStore(); var batchRelationship = Relationship.GetRelationship(relationship.Id, batch); Assert.IsTrue(batch.Execute()); var restRelationship = batch.GetGraphObject(batchRelationship); Assert.IsTrue(restRelationship == relationship); Assert.IsTrue(restRelationship.Properties.GetProperty <string>("name") == "michael"); Assert.IsTrue(restRelationship.Properties.GetProperty <bool>("approved")); Assert.IsTrue(restRelationship.Properties.GetProperty <int>("length") == 123); }
public void RemoveNodeToIndex4() { var batch = new BatchStore(); var node = Node.CreateNode(); var value1 = UniqueValue(); var value2 = UniqueValue(); node.AddToIndex("nodes", "a", value1); node.AddToIndex("nodes", "a", value2); node.AddToIndex("nodes", "b", value2); Node.RemoveFromIndex(node, "nodes", "a", value2, batch); Assert.IsTrue(batch.Execute()); var nodes1 = Node.GetNode("nodes", "a", value1); var nodes2 = Node.GetNode("nodes", "a", value2); var nodes3 = Node.GetNode("nodes", "b", value2); Assert.IsTrue(nodes1.Count() == 1); Assert.IsTrue(nodes2.Count() == 0); Assert.IsTrue(nodes3.Count() == 1); Assert.IsTrue(nodes1.First() == node); Assert.IsTrue(nodes3.First() == node); }
public void RemoveRelationshipToIndex4() { var batch = new BatchStore(); var node1 = Node.CreateNode(); var node2 = Node.CreateNode(); var relationship1 = node1.CreateRelationshipTo(node2, "like"); var value1 = UniqueValue(); var value2 = UniqueValue(); relationship1.AddToIndex("relationships", "a", value1); relationship1.AddToIndex("relationships", "a", value2); relationship1.AddToIndex("relationships", "b", value2); Relationship.RemoveFromIndex(relationship1, "relationships", "a", value2, batch); Assert.IsTrue(batch.Execute()); var relationships1 = Relationship.GetRelationship("relationships", "a", value1); var relationships2 = Relationship.GetRelationship("relationships", "a", value2); var relationships3 = Relationship.GetRelationship("relationships", "b", value2); Assert.IsTrue(relationships1.Count() == 1); Assert.IsTrue(relationships2.Count() == 0); Assert.IsTrue(relationships3.Count() == 1); Assert.IsTrue(relationships1.First() == relationship1); Assert.IsTrue(relationships3.First() == relationship1); }
public void RemoveRelationshpToIndex2() { var batch = new BatchStore(); var node1 = Node.CreateNode(); var node2 = Node.CreateNode(); var relationship1 = node1.CreateRelationshipTo(node2, "like"); var value1 = UniqueValue(); var value2 = UniqueValue(); relationship1.AddToIndex("relationships", "a", value1); relationship1.AddToIndex("relationships", "b", value2); Relationship.RemoveFromIndex(relationship1, "relationships", null, null, batch); Assert.IsTrue(batch.Execute()); var relationships1 = Relationship.GetRelationship("relationships", "a", value1); var relationships2 = Relationship.GetRelationship("relationships", "b", value2); Assert.IsTrue(!relationships1.Any()); Assert.IsTrue(!relationships2.Any()); }
public void CreateNodeWithProperties() { var batch = new BatchStore(); var prop1 = new Properties(); prop1.SetProperty("name", "michael"); prop1.SetProperty("location", "new york"); var prop2 = new Properties(); prop2.SetProperty("color", "blue"); prop2.SetProperty("tree", "elm"); var batchNode1 = Node.CreateNode(prop1, batch); var batchNode2 = Node.CreateNode(prop2, batch); Assert.IsTrue(batch.Execute()); var restNode1 = batch.GetGraphObject(batchNode1); var restNode2 = batch.GetGraphObject(batchNode2); Assert.IsTrue(restNode1.Id > 0); Assert.IsTrue(restNode2.Id > 0 && restNode1.Id != restNode2.Id); Assert.IsTrue(restNode1.Properties.GetProperty<string>("name") == "michael"); Assert.IsTrue(restNode1.Properties.GetProperty<string>("location") == "new york"); Assert.IsTrue(restNode2.Properties.GetProperty<string>("color") == "blue"); Assert.IsTrue(restNode2.Properties.GetProperty<string>("tree") == "elm"); }
public void CreateRelationshipWithProperties2() { var batch = new BatchStore(); var batchNode1 = Node.CreateNode(batch); var batchNode2 = Node.CreateNode(batch); var prop = new Properties(); var since = DateTime.Now; prop.SetProperty("since", since); prop.SetProperty("approved", true); var batchRelationship = Relationship.CreateRelationship(batchNode1, batchNode2, "friend", prop, batch); Assert.IsTrue(batch.Execute()); var restNode1 = batch.GetGraphObject(batchNode1); var restNode2 = batch.GetGraphObject(batchNode2); var restRelationship = batch.GetGraphObject(batchRelationship); Assert.IsTrue(restNode1.Id > 0); Assert.IsTrue(restNode2.Id > 0 && restNode1.Id != restNode2.Id); Assert.IsTrue(restRelationship.StartNode == restNode1); Assert.IsTrue(restRelationship.EndNode == restNode2); Assert.IsTrue(restRelationship.Type == "friend"); Assert.IsTrue(restRelationship.Properties.GetProperty <DateTime>("since") == since); Assert.IsTrue(restRelationship.Properties.GetProperty <bool>("approved")); }
public void DeleteBatchNode2() { var batch = new BatchStore(); var node = Node.CreateNode(batch); batch.Delete(node); batch.Execute(); }
public void GetAllRelationships1() { var batch = new BatchStore(); var batchNode = Node.CreateNode(batch); batchNode.GetRelationships(); batch.Execute(); }
public void CreateNodeNoProperties() { var batch = new BatchStore(); var batchNode = Node.CreateNode(null, batch); Assert.IsTrue(batch.Execute()); var restNode = batch.GetGraphObject(batchNode); Assert.IsTrue(restNode.Id > 0); }
public void DeleteNode() { var node = Node.CreateNode(); var batch = new BatchStore(); batch.Delete(node); Assert.IsTrue(batch.Execute()); Node.GetNode(node.Id); }
public void RemoveNodeToIndex1() { var batch = new BatchStore(); var batchNode = Node.CreateNode(batch); var value1 = UniqueValue(); var value2 = UniqueValue(); batchNode.AddToIndex("nodes", "a", value1); batchNode.RemoveFromIndex("nodes"); }
public void GetNode() { var node = Node.CreateNode(); var batch = new BatchStore(); var batchNode = Node.GetNode(node.Id, batch); Assert.IsTrue(batch.Execute()); var restNode = batch.GetGraphObject(batchNode); Assert.IsTrue(node == restNode); }
public void CreateTwoNodeNoProperties() { var batch = new BatchStore(); var batchNode1 = Node.CreateNode(batch); var batchNode2 = Node.CreateNode(batch); Assert.IsTrue(batch.Execute()); var restNode1 = batch.GetGraphObject(batchNode1); var restNode2 = batch.GetGraphObject(batchNode2); Assert.IsTrue(restNode1.Id > 0); Assert.IsTrue(restNode2.Id > 0 && restNode1.Id != restNode2.Id); }
public void RemoveRelationshpToIndex1() { var batch = new BatchStore(); var batchNode1 = Node.CreateNode(batch); var batchNode2 = Node.CreateNode(batch); var batchRelationship = batchNode1.CreateRelationshipTo(batchNode2, "like"); var value1 = UniqueValue(); batchRelationship.AddToIndex("relationships", "a", value1); batchRelationship.RemoveFromIndex("nodes"); }
public void CreateUniqueNodeInIndex2() { var batch = new BatchStore(); var value1 = UniqueValue(); var props = new Properties(); props.SetProperty("name", "jack"); var node = Node.CreateUniqueNode("nodes", "a", value1, IndexUniqueness.GetOrCreate, props); var batchNode = Node.CreateUniqueNode("nodes", "a", value1, IndexUniqueness.CreateOrFail, props, batch); //Should fail because dup key in index Assert.IsFalse(batch.Execute()); }
public void AddNodeToIndex() { var batch = new BatchStore(); var batchNode = Node.CreateNode(batch); var value1 = UniqueValue(); batchNode.AddToIndex("nodes", "a", value1); Assert.IsTrue(batch.Execute()); var restNode = batch.GetGraphObject(batchNode); var nodes = Node.GetNode("nodes", "a", value1); Assert.IsTrue(nodes.Count() == 1); Assert.IsTrue(nodes.First() == restNode); }
public void UpdatePropertyOnNode2() { var batch = new BatchStore(); var batchNode = Node.CreateNode(batch); batchNode.Properties.SetProperty("name", "todd"); batchNode.Properties.SetProperty("moved", true); batchNode.Properties.SetProperty("height", 13); batchNode.SaveProperties(); Assert.IsTrue(batch.Execute()); var restNode = batch.GetGraphObject(batchNode); Assert.IsTrue(restNode.Properties.GetProperty <string>("name") == "todd"); Assert.IsTrue(restNode.Properties.GetProperty <bool>("moved")); Assert.IsTrue(restNode.Properties.GetProperty <int>("height") == 13); }
public void CreateRelationshipNoProperties2() { var batch = new BatchStore(); var batchNode1 = Node.CreateNode(batch); var batchNode2 = Node.CreateNode(batch); var batchRelationship = Relationship.CreateRelationship(batchNode1, batchNode2, "friend", null, batch); Assert.IsTrue(batch.Execute()); var restNode1 = batch.GetGraphObject(batchNode1); var restNode2 = batch.GetGraphObject(batchNode2); var restRelationship = batch.GetGraphObject(batchRelationship); Assert.IsTrue(restNode1.Id > 0); Assert.IsTrue(restNode2.Id > 0 && restNode1.Id != restNode2.Id); Assert.IsTrue(restRelationship.StartNode == restNode1); Assert.IsTrue(restRelationship.EndNode == restNode2); Assert.IsTrue(restRelationship.Type == "friend"); }
public void AddRelationshipsToIndex() { var batch = new BatchStore(); var batchNode1 = Node.CreateNode(batch); var batchNode2 = Node.CreateNode(batch); var batchRelationship = batchNode1.CreateRelationshipTo(batchNode2, "friend"); var value1 = UniqueValue(); batchRelationship.AddToIndex("relationships", "a", value1); Assert.IsTrue(batch.Execute()); var restRelationship = batch.GetGraphObject(batchRelationship); var relationships = Relationship.GetRelationship("relationships", "a", value1); Assert.IsTrue(relationships.Count() == 1); Assert.IsTrue(relationships.First() == restRelationship); }
public void CreateUniqueNodeInIndex1() { var batch = new BatchStore(); var value1 = UniqueValue(); var props = new Properties(); props.SetProperty("name", "jack"); var batchNode = Node.CreateUniqueNode("nodes", "a", value1, IndexUniqueness.CreateOrFail, props, batch); Assert.IsTrue(batch.Execute()); var restNode = batch.GetGraphObject(batchNode); var nodes = Node.GetNode("nodes", "a", value1); Assert.IsTrue(nodes.Count() == 1); Assert.IsTrue(nodes.First() == restNode); Assert.IsTrue(restNode.Properties.GetProperty <string>("name") == "jack"); }
public void RemoveNodeToIndex2() { var batch = new BatchStore(); var node = Node.CreateNode(); var value1 = UniqueValue(); var value2 = UniqueValue(); node.AddToIndex("nodes", "a", value1); node.AddToIndex("nodes", "b", value2); Node.RemoveFromIndex(node, "nodes", null, null, batch); Assert.IsTrue(batch.Execute()); var nodes1 = Node.GetNode("nodes", "a", value1); var nodes2 = Node.GetNode("nodes", "b", value2); Assert.IsTrue(!nodes1.Any()); Assert.IsTrue(!nodes2.Any()); }
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); }
public void CreateUniqueNodeInIndex3() { var batch = new BatchStore(); var value1 = UniqueValue(); var props1 = new Properties(); props1.SetProperty("name", "jack"); var props2 = new Properties(); props2.SetProperty("name", "frank"); var batchNode1 = Node.CreateUniqueNode("nodes", "a", value1, IndexUniqueness.CreateOrFail, props1, batch); var batchNode2 = Node.CreateUniqueNode("nodes", "a", value1, IndexUniqueness.CreateOrFail, props2, batch); //var batchNode1 = Node.CreateUniqueNode("nodes", "a", value1, IndexUniqueness.CreateOrFail, null, batch); //var batchNode2 = Node.CreateUniqueNode("nodes", "a", value1, IndexUniqueness.CreateOrFail, null, batch); Assert.IsFalse(batch.Execute()); }
public void UpdateRelationshipProperties1() { var node1 = Node.CreateNode(); var node2 = Node.CreateNode(); var batch = new BatchStore(); var batchRelationship = Relationship.CreateRelationship(node1, node2, "likes", null, batch); batchRelationship.Properties.SetProperty("name", "todd"); batchRelationship.Properties.SetProperty("moved", true); batchRelationship.Properties.SetProperty("height", 13); batchRelationship.SaveProperties(); Assert.IsTrue(batch.Execute()); var restRelationship = batch.GetGraphObject(batchRelationship); Assert.IsTrue(restRelationship.Properties.GetProperty <string>("name") == "todd"); Assert.IsTrue(restRelationship.Properties.GetProperty <bool>("moved")); Assert.IsTrue(restRelationship.Properties.GetProperty <int>("height") == 13); }
public void CreateRelationshipWithProperties2() { var batch = new BatchStore(); var batchNode1 = Node.CreateNode(batch); var batchNode2 = Node.CreateNode(batch); var prop = new Properties(); var since = DateTime.Now; prop.SetProperty("since", since); prop.SetProperty("approved", true); var batchRelationship = Relationship.CreateRelationship(batchNode1, batchNode2, "friend", prop, batch); Assert.IsTrue(batch.Execute()); var restNode1 = batch.GetGraphObject(batchNode1); var restNode2 = batch.GetGraphObject(batchNode2); var restRelationship = batch.GetGraphObject(batchRelationship); Assert.IsTrue(restNode1.Id > 0); Assert.IsTrue(restNode2.Id > 0 && restNode1.Id != restNode2.Id); Assert.IsTrue(restRelationship.StartNode == restNode1); Assert.IsTrue(restRelationship.EndNode == restNode2); Assert.IsTrue(restRelationship.Type == "friend"); Assert.IsTrue(restRelationship.Properties.GetProperty<DateTime>("since") == since); Assert.IsTrue(restRelationship.Properties.GetProperty<bool>("approved")); }
public void CreateUniqueNodeInIndex1() { var batch = new BatchStore(); var value1 = UniqueValue(); var props = new Properties(); props.SetProperty("name", "jack"); var batchNode = Node.CreateUniqueNode("nodes", "a", value1, IndexUniqueness.CreateOrFail, props, batch); Assert.IsTrue(batch.Execute()); var restNode = batch.GetGraphObject(batchNode); var nodes = Node.GetNode("nodes", "a", value1); Assert.IsTrue(nodes.Count() == 1); Assert.IsTrue(nodes.First() == restNode); Assert.IsTrue(restNode.Properties.GetProperty<string>("name") == "jack"); }
public void UpdatePropertyOnNode2() { var batch = new BatchStore(); var batchNode = Node.CreateNode(batch); batchNode.Properties.SetProperty("name", "todd"); batchNode.Properties.SetProperty("moved", true); batchNode.Properties.SetProperty("height", 13); batchNode.SaveProperties(); Assert.IsTrue(batch.Execute()); var restNode = batch.GetGraphObject(batchNode); Assert.IsTrue(restNode.Properties.GetProperty<string>("name") == "todd"); Assert.IsTrue(restNode.Properties.GetProperty<bool>("moved")); Assert.IsTrue(restNode.Properties.GetProperty<int>("height") == 13); }
public void CreateUniqueNodeUpdateIndexValueDupFail() { var batch = new BatchStore(); var value1 = UniqueValue(); var props1 = new Properties(); props1.SetProperty("name", "jack"); props1.SetProperty("a", value1); var batchNode1 = Node.CreateUniqueNode("nodes", "a", value1, IndexUniqueness.CreateOrFail, props1, batch); var insertResult = batch.Execute(); Assert.IsTrue(insertResult); var graphNode = batch.GetGraphObject(batchNode1); // try to update unique index value. batch = new BatchStore(); var value2 = UniqueValue(); // create node with new value - will fail because value already exists. var fakeNode = Node.CreateUniqueNode("nodes", "a", value1, IndexUniqueness.CreateOrFail, null, batch); // delete old node from index Node.RemoveFromIndex(graphNode, "nodes", "a", null, batch); // update properties on node Node.SetProperty(graphNode, "a", value2, batch); Node.SetProperty(graphNode, "name", "tom", batch); // add node to index with new key/value for index Node.AddToIndex(graphNode, "nodes", "a", value2, batch); // execute batch var updateResult = batch.Execute(); if (updateResult) { fakeNode = batch.GetGraphObject(fakeNode); // remove fake node fakeNode.RemoveFromIndex("nodes"); fakeNode.Delete(); } Assert.IsFalse(updateResult); //verify old key is in index var findNode = Node.GetNode("nodes", "a", value1); Assert.IsTrue(findNode.Count() == 1); Assert.IsTrue(findNode.First().GetProperty("a").ToString() == value1); //verify new key is not in index var missingNode = Node.GetNode("nodes", "a", value2); Assert.IsFalse(missingNode.Any()); }
public void RemoveRelationshipProperties() { var node1 = Node.CreateNode(); var node2 = Node.CreateNode(); var batch = new BatchStore(); var batchRelationship = Relationship.CreateRelationship(node1, node2, "likes", null, batch); batchRelationship.Properties.SetProperty("name", "joe"); batchRelationship.Properties.SetProperty("age", 12); batchRelationship.SaveProperties(); batchRelationship.Properties.RemoveProperty("age"); batchRelationship.SaveProperties(); Assert.IsTrue(batch.Execute()); var restRelationship = batch.GetGraphObject(batchRelationship); Assert.IsTrue(restRelationship.Properties.GetProperty<string>("name") == "joe"); Assert.IsTrue(restRelationship.Properties.GetPropertyOrDefault<int>("age") == 0); }
public void CreateUniqueNodeUpdateIndexValueDupFail() { var batch = new BatchStore(); var value1 = UniqueValue(); var props1 = new Properties(); props1.SetProperty("name", "jack"); props1.SetProperty("a", value1); var batchNode1 = Node.CreateUniqueNode("nodes", "a", value1, IndexUniqueness.CreateOrFail, props1, batch); var insertResult = batch.Execute(); Assert.IsTrue(insertResult); var graphNode = batch.GetGraphObject(batchNode1); // try to update unique index value. batch = new BatchStore(); var value2 = UniqueValue(); // create node with new value - will fail because value already exists. var fakeNode = Node.CreateUniqueNode("nodes", "a", value1, IndexUniqueness.CreateOrFail, null, batch); // delete old node from index Node.RemoveFromIndex(graphNode, "nodes", "a", null, batch); // update properties on node Node.SetProperty(graphNode, "a", value2,batch); Node.SetProperty(graphNode, "name", "tom", batch); // add node to index with new key/value for index Node.AddToIndex(graphNode, "nodes", "a", value2, batch); // execute batch var updateResult = batch.Execute(); if (updateResult) { fakeNode = batch.GetGraphObject(fakeNode); // remove fake node fakeNode.RemoveFromIndex("nodes"); fakeNode.Delete(); } Assert.IsFalse(updateResult); //verify old key is in index var findNode = Node.GetNode("nodes", "a", value1); Assert.IsTrue(findNode.Count() == 1); Assert.IsTrue(findNode.First().GetProperty("a").ToString() == value1); //verify new key is not in index var missingNode = Node.GetNode("nodes", "a", value2); Assert.IsFalse(missingNode.Any()); }
public void GetRelationshipWithProperties() { var node1 = Node.CreateNode(); var node2 = Node.CreateNode(); var props = new Properties(); props.SetProperty("name", "michael"); props.SetProperty("approved", true); props.SetProperty("length", 123); var relationship = node1.CreateRelationshipTo(node2, "friend", props); var batch = new BatchStore(); var batchRelationship = Relationship.GetRelationship(relationship.Id, batch); Assert.IsTrue(batch.Execute()); var restRelationship = batch.GetGraphObject(batchRelationship); Assert.IsTrue(restRelationship == relationship); Assert.IsTrue(restRelationship.Properties.GetProperty<string>("name") == "michael"); Assert.IsTrue(restRelationship.Properties.GetProperty<bool>("approved")); Assert.IsTrue(restRelationship.Properties.GetProperty<int>("length") == 123); }
public void UpdateRelationshipProperties1() { var node1 = Node.CreateNode(); var node2 = Node.CreateNode(); var batch = new BatchStore(); var batchRelationship = Relationship.CreateRelationship(node1, node2, "likes", null, batch); batchRelationship.Properties.SetProperty("name", "todd"); batchRelationship.Properties.SetProperty("moved", true); batchRelationship.Properties.SetProperty("height", 13); batchRelationship.SaveProperties(); Assert.IsTrue(batch.Execute()); var restRelationship = batch.GetGraphObject(batchRelationship); Assert.IsTrue(restRelationship.Properties.GetProperty<string>("name") == "todd"); Assert.IsTrue(restRelationship.Properties.GetProperty<bool>("moved")); Assert.IsTrue(restRelationship.Properties.GetProperty<int>("height") == 13); }
public BatchNodeStore(BatchStore batchStore) { _batchStore = batchStore; }
public BatchRelationshipStore(BatchStore batchStore) { _batchStore = batchStore; }
public void CreateUniqueNodeInIndex2() { var batch = new BatchStore(); var value1 = UniqueValue(); var props1 = new Properties(); props1.SetProperty("name", "jack"); var props2 = new Properties(); props2.SetProperty("name", "frank"); var batchNode1 = Node.CreateUniqueNode("nodes", "a", value1, props1, batch); var batchNode2 = Node.CreateUniqueNode("nodes", "a", value1, props2, batch); Assert.IsTrue(batch.Execute()); var restNode1 = batch.GetGraphObject(batchNode1); var restNode2 = batch.GetGraphObject(batchNode2); var nodes = Node.GetNode("nodes", "a", value1); Assert.IsTrue(nodes.Count() == 1); Assert.IsTrue(nodes.First() == restNode1); Assert.IsTrue(restNode1 == restNode2); Assert.IsTrue(restNode1.Properties.GetProperty<string>("name") == "jack"); }