Exemple #1
0
        public void GarageFacroty_ShowAvailableAppointments_Return_error_Message_When_The_Model_Is_Null()
        {
            PrivateObject maxDaysObj = new PrivateObject(_garage);

            maxDaysObj.SetField("maxNextDays", 1);
            using (ShimsContext.Create())
            {
                GarageBooker.Fakes.ShimCommon.ListAppointmentBookedPerDayStringInt32 = (filePath, maxNextDays) =>
                {
                    throw new Exception();
                };

                var result = _garage.ShowAvailableAppointments();

                var errorMessageAspected = "There is a fatal error in the file";
                Assert.AreEqual(true, result.StartsWith(errorMessageAspected));
            }
        }
Exemple #2
0
        static void ShowBookedAppointments(IGarage garage)
        {
            var showAvailability = garage.ShowAvailableAppointments();

            Console.WriteLine("Show timetable available mechanics:");
            Console.WriteLine("_______________________________________________________________");
            Console.WriteLine(showAvailability);
            Console.WriteLine("_______________________________________________________________");
            Console.WriteLine("");
        }