Esempio n. 1
0
  @BeforeClass
  public static void prepareRestaurant() {
    running(
        fakeApplication(),
        () -> {
          Coordinates coordinates = new Coordinates();
          coordinates.setRestaurantId(1601994);
          coordinates.setLatitude(5.5);
          coordinates.setLongitude(1.1);
          coordinates.save();

          Address address = new Address();
          address.setEmail("*****@*****.**");
          address.setCity("Test City");
          address.setCountry("Test Country");
          address.setStreetName("Test street");
          address.setRestaurantId(1601994);
          address.save();

          Restaurant restaurant = new Restaurant();
          restaurant.setRestaurantId(1601994);
          restaurant.setAddress(address);
          restaurant.setCoordinates(coordinates);
          restaurant.setName("Test restaurant");
          restaurant.setDeals("");
          restaurant.setPhone(2252);
          restaurant.setRating(2);
          restaurant.setReservationPrice(3);
          restaurant.setWorkingHours("");

          restaurant.save();
        });
  }
Esempio n. 2
0
 private void displayPersonAddress(Address address) {
   tfStreet1.setText(address.getStreet1());
   tfStreet2.setText(address.getStreet2());
   tfCity.setText(address.getCity());
   tfZipcode.setText(address.getZipcode());
 }