Search in sources :

Example 1 with Room

use of com.github.drbookings.model.data.Room in project drbookings by DrBookings.

the class NightlyRateViewTest method test01.

@Test
public void test01() {
    final BookingBean booking1 = new BookingBean("id1", new Guest("g1"), new Room("1"), new BookingOrigin("airbnb"), LocalDate.of(2000, 4, 4), LocalDate.of(2000, 4, 6));
    final BookingBean booking2 = new BookingBean("id2", new Guest("g2"), new Room("2"), new BookingOrigin("airbnb"), LocalDate.of(2000, 4, 4), LocalDate.of(2000, 4, 6));
    booking1.setGrossEarningsExpression("100");
    booking2.setGrossEarningsExpression("200");
    final List<BookingEntry> entries1 = booking1.getEntries();
    final List<BookingEntry> entries2 = booking2.getEntries();
    // System.out.println(entries.stream().map(b -> b.toString()).collect(Collectors.joining("\n")));
    view.addAll(entries1);
    view.addAll(entries2);
    assertThat(view.data.size(), is(1));
}
Also used : Guest(com.github.drbookings.model.data.Guest) BookingOrigin(com.github.drbookings.model.data.BookingOrigin) Room(com.github.drbookings.model.data.Room) BookingEntry(com.github.drbookings.ui.BookingEntry) BookingBean(com.github.drbookings.model.data.BookingBean) Test(org.junit.Test)

Aggregations

BookingBean (com.github.drbookings.model.data.BookingBean)1 BookingOrigin (com.github.drbookings.model.data.BookingOrigin)1 Guest (com.github.drbookings.model.data.Guest)1 Room (com.github.drbookings.model.data.Room)1 BookingEntry (com.github.drbookings.ui.BookingEntry)1 Test (org.junit.Test)1