Package sample.data.jpa.domain

Examples of sample.data.jpa.domain.City


    assertThat(cities.getTotalElements(), is(greaterThan(20L)));
  }

  @Test
  public void findByNameAndCountry() {
    City city = this.repository.findByNameAndCountryAllIgnoringCase("Melbourne",
        "Australia");
    assertThat(city, notNullValue());
    assertThat(city.getName(), is(equalTo("Melbourne")));
  }
View Full Code Here


  @Autowired
  HotelRepository repository;

  @Test
  public void executesQueryMethodsCorrectly() {
    City city = this.cityRepository
        .findAll(new PageRequest(0, 1, Direction.ASC, "name")).getContent()
        .get(0);
    assertThat(city.getName(), is("Atlanta"));

    Page<HotelSummary> hotels = this.repository.findByCity(city, new PageRequest(0,
        10, Direction.ASC, "name"));
    Hotel hotel = this.repository.findByCityAndName(city, hotels.getContent().get(0)
        .getName());
View Full Code Here

TOP

Related Classes of sample.data.jpa.domain.City

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.