@Test public void deletedNewLabelShouldNotInfluenceEquality() { // bug test try (Transaction tx = database.beginTx()) { database.createNode(DynamicLabel.label("Accident")); database.createNode(DynamicLabel.label("RealLabel")); tx.success(); } try (Transaction tx = database.beginTx()) { database.getNodeById(0).delete(); tx.success(); } String cypher = "CREATE (n:RealLabel)"; assertSameGraph(database, cypher); }
@Test public void equalArraysWithDifferentTypeShouldBeEqual() { try (Transaction tx = database.beginTx()) { database.createNode().setProperty("number", new int[] {123, 124}); tx.success(); } String cypher = "CREATE (n {number:[123,124]})"; assertSameGraph(database, cypher); }
@Test public void deletedNewPropsShouldNotInfluenceEquality() { // bug test try (Transaction tx = database.beginTx()) { database.createNode().setProperty("accident", "dummy"); database.createNode(); tx.success(); } try (Transaction tx = database.beginTx()) { database.getNodeById(0).delete(); tx.success(); } String cypher = "CREATE (n)"; assertSameGraph(database, cypher); }
@Test public void deletedRelationshipWithNewTypeShouldNotInfluenceEquality() { // bug test try (Transaction tx = database.beginTx()) { Node node1 = database.createNode(); Node node2 = database.createNode(); node1.createRelationshipTo(node2, DynamicRelationshipType.withName("ACCIDENT")); tx.success(); } try (Transaction tx = database.beginTx()) { GlobalGraphOperations.at(database).getAllRelationships().iterator().next().delete(); tx.success(); } String cypher = "CREATE (n), (m)"; assertSameGraph(database, cypher); }