@org.junit.Test public void testgetBookings() throws Exception { Booking[] bfylki = bcontroller.getBookings(hotel); assertNotNull(bfylki); assertEquals(bfylki[1].getId(), book.getId()); }
// ath hvort skili ekki error ef við setjum inn streng með tölum (aðferðin ætti að parsa það yfir // í int) @org.junit.Test public void testIntStringGetBooking() throws Exception { String id = "" + book.getId(); testbooking = bcontroller.getBooking(id); assertEquals(testbooking.getId(), book.getId()); }
@org.junit.Test public void testgetBooking() throws Exception { Booking btest = bcontroller.getBooking(book.getId()); assertNotNull(btest); assertEquals(btest.getId(), book.getId()); }
@org.junit.After public void tearDown() throws Exception { bcontroller.deleteBooking(book.getId()); bcontroller = null; }