Package org.springframework.data.neo4j.model

Examples of org.springframework.data.neo4j.model.Friendship


 
  @Test(expected=ValidationException.class)
    public void testRelationshipPropertyValidation() {
        final Person john = personRepo.save(new Person("John", 50));
        final Person jack = personRepo.save(new Person("Jack", 45));
        final Friendship friendship = john.knows(jack);
        friendship.setYears(100);
        friendshipRepo.save(friendship);
    }
View Full Code Here


        storeInGraph(andres);

        Relationship friendshipRelationship = makeFriends(michaelNode(), andresNode(), 19);

        Person m = readPerson(michaelNode());
        Friendship friendship = first(m.getFriendships());

        assertEquals((Long) friendshipRelationship.getId(), friendship.getId());
        assertEquals(19, friendship.getYears());
        assertEquals(friendship.getPerson1(), michael);
        assertEquals(friendship.getPerson2(), andres);
    }
View Full Code Here

TOP

Related Classes of org.springframework.data.neo4j.model.Friendship

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.