private void ResetUserInterface() { if (activeBooking != null) { bookings.DeleteID(activeBooking.GetID()); activeBooking = null; screen.ClearTextBoxes(); screen.DisableButtons(); } }
public void BookingCollectionDeleteIDSuccess() { 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 mockClient = Substitute.For <Client>("123", "CompanyName1", "CompanyAddress1"); Booking booking1 = new Booking("1", BookingType.FACILITATED, mockClient, mockDate, mockTime, mockVenue); Booking booking2 = new Booking("2", BookingType.FACILITATED, mockClient, mockDate, mockTime, mockVenue); testCollection.Add(booking1); testCollection.Add(booking2); testCollection.DeleteID("1"); Assert.AreEqual <int>(1, testCollection.GetSize()); Assert.IsTrue(testCollection.Contains(booking2)); }