public void BookingCollectionGetClientBookingsReturnsEmptyList() { BookingCollection testCollection = new BookingCollection(); Date mockDate = Substitute.For <Date>(12, 9, 2019); Time mockTime = Substitute.For <Time>(12, 54); IVenue mockVenue = Substitute.For <IVenue>(); Client client1 = new Client("123", "CompanyName1", "CompanyAddress1"); Client client2 = new Client("456", "CompanyName2", "CompanyAddress2"); Booking booking1 = new Booking("1", BookingType.FACILITATED, client1, mockDate, mockTime, mockVenue); Booking booking2 = new Booking("2", BookingType.FACILITATED, client1, mockDate, mockTime, mockVenue); testCollection.Add(booking1); testCollection.Add(booking2); Assert.AreEqual(0, testCollection.GetClientBookings(client2).Count); Assert.IsInstanceOfType(testCollection.GetClientBookings(client1), typeof(BookingCollection)); }
public void GetAllClientBookings(int clientIndex) { currentClientIndex = clientIndex; screen.SetBookings(bookings.GetClientBookings(clients[clientIndex]).GetStrings()); screen.EnableSelectBookingButton(); }