コード例 #1
0
  @Test(expected = HotelInputException.class)
  public void testDoAdapterWithEmptyInput() throws Exception {
    hotelInputReader.clean();

    CustomerAdapter adapter = new CustomerAdapter(hotelInputReader);
    adapter.doAdapter();
  }
コード例 #2
0
  private Customer getCustomerByFile(String file) throws IOException, HotelInputException {
    String input = super.loadInputFromFile(file);
    hotelInputReader.read(input);

    CustomerAdapter adapter = new CustomerAdapter(hotelInputReader);
    adapter.doAdapter();

    return adapter.getCustomer();
  }