@Test public void lodging() { assertEquals(0, store.selectAllTrips().size()); final Trip trip=new Trip("Foo", 2880, Priority.LOW, new Date()); assertNotNull(trip.id); assertNotEquals(0, trip.id.length()); store.insert(trip); assertTrip(store, trip); final Lodging first= new Lodging("Hotel Von", 2880, Priority.MEDIUM, new Date(), "1313 Mockingbird Lane", trip.id); assertNotNull(first.id); assertNotEquals(0, first.id.length()); store.insert(first); assertLodging(store, first); store.delete(trip); assertEquals(0, store.findLodgingsForTrip(trip.id).size()); }
@Test public void lodging() { assertEquals(0, store.selectAllTrips().size()); final Trip trip=new Trip("Foo", 2880, Priority.LOW, new Date()); assertNotNull(trip.id); assertNotEquals(0, trip.id.length()); store.insert(trip); assertTrip(store, trip); final Lodging first= new Lodging("Hotel Von", 2880, Priority.MEDIUM, new Date(), "1313 Mockingbird Lane", trip.id); assertNotNull(first.id); assertNotEquals(0, first.id.length()); store.insert(first); assertLodging(store, first); store.delete(trip); assertEquals(0, store.findLodgingsForTrip(trip.id).size()); }
@Test public void lodging() { assertEquals(0, store.selectAllTrips().size()); final Trip trip=new Trip("Foo", 2880, Priority.LOW, new Date()); assertNotNull(trip.id); assertNotEquals(0, trip.id.length()); store.insert(trip); assertTrip(store, trip); final Lodging first= new Lodging("Hotel Von", 2880, Priority.MEDIUM, new Date(), "1313 Mockingbird Lane", trip.id); assertNotNull(first.id); assertNotEquals(0, first.id.length()); store.insert(first); assertLodging(store, first); store.delete(trip); assertEquals(0, store.findLodgingsForTrip(trip.id).size()); }
@Test public void lodging() { assertEquals(0, store.selectAllTrips().size()); final Trip trip=new Trip("Foo", 2880, Priority.LOW, new Date()); assertNotNull(trip.id); assertNotEquals(0, trip.id.length()); store.insert(trip); assertTrip(store, trip); final Lodging first= new Lodging("Hotel Von", 2880, Priority.MEDIUM, new Date(), "1313 Mockingbird Lane", trip.id); assertNotNull(first.id); assertNotEquals(0, first.id.length()); store.insert(first); assertLodging(store, first); store.delete(trip); assertEquals(0, store.findLodgingsForTrip(trip.id).size()); }
@Test public void lodging() { assertEquals(0, store.selectAllTrips().size()); final Trip trip=new Trip("Foo", 2880, Priority.LOW, new Date()); assertNotNull(trip.id); assertNotEquals(0, trip.id.length()); store.insert(trip); assertTrip(store, trip); final Lodging first= new Lodging("Hotel Von", 2880, Priority.MEDIUM, new Date(), "1313 Mockingbird Lane", trip.id); assertNotNull(first.id); assertNotEquals(0, first.id.length()); store.insert(first); assertLodging(store, first); store.delete(trip); assertEquals(0, store.findLodgingsForTrip(trip.id).size()); }
@Test public void lodging() { assertEquals(0, store.selectAllTrips().size()); final Trip trip=new Trip("Foo", 2880, Priority.LOW, new Date()); assertNotNull(trip.id); assertNotEquals(0, trip.id.length()); store.insert(trip); assertTrip(store, trip); final Lodging first= new Lodging("Hotel Von", 2880, Priority.MEDIUM, new Date(), "1313 Mockingbird Lane", trip.id); assertNotNull(first.id); assertNotEquals(0, first.id.length()); store.insert(first); assertLodging(store, first); store.delete(trip); assertEquals(0, store.findLodgingsForTrip(trip.id).size()); }