Package org.springframework.data.neo4j

Examples of org.springframework.data.neo4j.Volvo


    @Test
  @Transactional
  public void testInstantiateConcreteClass() {
    log.debug("testInstantiateConcreteClass");
        Person p = persistedPerson("Michael", 35);
    Car c = new Volvo().persist();
    p.setCar(c);
    assertEquals("Wrong concrete class.", Volvo.class, p.getCar().getClass());
  }
View Full Code Here


  @Test
  @Transactional
  public void testInstantiateConcreteClassWithFinder() {
    log.debug("testInstantiateConcreteClassWithFinder");
    Volvo v=new Volvo().persist();
        GraphRepository<Car> finder = graphRepositoryFactory.createGraphRepository(Car.class);
    assertEquals("Wrong concrete class.", Volvo.class, finder.findAll().iterator().next().getClass());
  }
View Full Code Here

  @Test
  @Transactional
  public void testCountSubclasses() {
    log.warn("testCountSubclasses");
    new Volvo().persist();
    log.warn("Created volvo");
    new Toyota().persist();
    log.warn("Created volvo");
        assertEquals("Wrong count for Volvo.", 1L, graphRepositoryFactory.createGraphRepository(Volvo.class).count());
        assertEquals("Wrong count for Toyota.", 1L, graphRepositoryFactory.createGraphRepository(Toyota.class).count());
View Full Code Here

TOP

Related Classes of org.springframework.data.neo4j.Volvo

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.