Exemplo n.º 1
0
 // old node as argument
 public void testCreateRelationToNewNode2() {
   Cloud cloud = getCloud();
   Transaction t = cloud.getTransaction("createrelationtrans");
   Node n = t.getNode(newNode);
   NodeManager urls = t.getNodeManager("urls");
   Node url = urls.createNode();
   RelationManager rm = t.getRelationManager("urls", "news", "posrel");
   Relation r = url.createRelation(n, rm);
   t.commit();
 }
Exemplo n.º 2
0
 public void testCreateRelationBetweenNewNodes() {
   Cloud cloud = getCloud();
   Transaction t = cloud.getTransaction("createrelationtrans");
   NodeManager news = t.getNodeManager("news");
   Node n = news.createNode();
   NodeManager urls = t.getNodeManager("urls");
   Node url = urls.createNode();
   RelationManager rm = t.getRelationManager("news", "urls", "posrel");
   Relation r = n.createRelation(url, rm);
   t.commit();
 }
Exemplo n.º 3
0
 public void testTransactionsAreEqual() {
   Cloud cloud = getCloud();
   Transaction t1 = cloud.getTransaction("testequals");
   Transaction t2 = cloud.getTransaction("testequals");
   assertEquals(t1, t2);
   Node n = t1.getNode(newNode);
   NodeManager urls = t2.getNodeManager("urls");
   Node url = urls.createNode();
   RelationManager rm = t2.getRelationManager("urls", "news", "posrel");
   Relation r = url.createRelation(n, rm);
   t2.commit();
   assertTrue(t2.isCommitted());
   assertTrue(t1.isCommitted());
   // assertTrue(t1 == t2); // FAILS IN RMMCI. Perhaps we should simply implement .equals on
   // transactions
 }