public BookingServiceClashDetectionTestCaseData(string testDescription, Car car, float discount, int duration, string name, DateTime startDate, params Booking[] existingCarBookings) { TestDescription = testDescription; Car = car; Discount = discount; Duration = duration; Name = name; StartDate = startDate; ExistingBookings = new BookingRepository(); if (existingCarBookings != null && existingCarBookings.Any()) { foreach (var existingBooking in existingCarBookings) { ExistingBookings.AddCarBooking(existingBooking); } } }