testGetRelationshipTo unit test added that shows broken NodeBacking.getRelationshipTo

This commit is contained in:
Jean-Pierre Bergamin
2011-10-17 14:23:35 +02:00
parent 9a93a63cbd
commit 079078fdbe

View File

@@ -16,6 +16,7 @@
package org.springframework.data.neo4j.aspects.support;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.neo4j.graphdb.Direction;
@@ -31,6 +32,7 @@ import org.springframework.transaction.annotation.Transactional;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.springframework.data.neo4j.aspects.Person.persistedPerson;
@RunWith(SpringJUnit4ClassRunner.class)
@@ -98,6 +100,16 @@ public class RelationshipEntityTest extends EntityTestBase {
Friendship f = p.knows(p2);
assertEquals(f, neo4jTemplate.getRelationshipBetween(p, p2, Friendship.class, "knows"));
}
@Ignore("The NodeBacking.getRelationshipTo() method is broken at the moment")
@Test
@Transactional
public void testGetRelationshipTo() {
Person p = persistedPerson("Michael", 35);
Person p2 = persistedPerson("David", 25);
Friendship f = p.knows(p2);
assertNotNull(p.getRelationshipTo(p2, "knows"));
}
@Test
public void testRemoveRelationshipEntity() {