예제 #1
0
        public void Build_WhenCall_Returns_Timeslots_For_Sunday()
        {
            GetTimeSlotsProcess process = new GetTimeSlotsProcess(_mockLogger.Object);

            TimeSpan CallbackTimeSlotStartTime = TimeSpan.Parse("14:00");
            TimeSpan CallbackTimeSlotEndTime   = TimeSpan.Parse("08:00");

            List <KeyValuePair <string, string> > list = process.Build(CallbackTimeSlotStartTime, CallbackTimeSlotEndTime);

            Assert.AreEqual(1, list.Count);
        }
예제 #2
0
        public void Build_WhenCall_Returns_Timeslots_For_Saturday()
        {
            GetTimeSlotsProcess process = new GetTimeSlotsProcess(_mockLogger.Object);

            TimeSpan CallbackTimeSlotSaturdayStartTime = TimeSpan.Parse("08:00");
            TimeSpan CallbackTimeSlotSaturdayEndTime   = TimeSpan.Parse("14:00");

            List <KeyValuePair <string, string> > list = process.Build(CallbackTimeSlotSaturdayStartTime, CallbackTimeSlotSaturdayEndTime);

            Assert.AreEqual(4, list.Count);

            AssertKeyValuePair(null, "Time slot", list[0]);
            AssertKeyValuePair("08:00 AM - 10:00 AM", "08:00 AM - 10:00 AM", list[1]);
            AssertKeyValuePair("10:00 AM - 12:00 PM", "10:00 AM - 12:00 PM", list[2]);
            AssertKeyValuePair("12:00 PM - 02:00 PM", "12:00 PM - 02:00 PM", list[3]);
        }