public void GetServiceAvailability_In_Hours_And_Timeframe_In_hours_Test() { _mockProfileHoursOfConfiguration .Setup(c => c.GetServiceTime(InHoursToOoHoursPeriodWeekday.Item1)) .Returns(ProfileServiceTimes.InHours); _serviceAvailabilityProfile = new ServiceAvailabilityProfile(_mockProfileHoursOfConfiguration.Object, FILTERED_DOS_SERVICCE_TYPES); var result = _serviceAvailabilityProfile.GetServiceAvailability(InHoursToOoHoursPeriodWeekday.Item1, 60); Assert.AreEqual(DispositionTimePeriod.DispositionAndTimeFrameInHours, result); }
public void GetServiceAvailability_Out_of_Hours_And_Timeframe_in_shoulder_Test() { _mockProfileHoursOfConfiguration .Setup(c => c.GetServiceTime(OoHoursToOoHoursPeriodWeekday.Item1)) .Returns(ProfileServiceTimes.OutOfHours); _mockProfileHoursOfConfiguration .Setup(c => c.GetServiceTime(OoHoursToOoHoursPeriodWeekday.Item1.AddMinutes(OoHoursToOoHoursPeriodWeekday.Item2))) .Returns(ProfileServiceTimes.InHoursShoulder); _serviceAvailabilityProfile = new ServiceAvailabilityProfile(_mockProfileHoursOfConfiguration.Object, FILTERED_DOS_SERVICCE_TYPES); var result = _serviceAvailabilityProfile.GetServiceAvailability(OoHoursToOoHoursPeriodWeekday.Item1, OoHoursToOoHoursPeriodWeekday.Item2); Assert.AreEqual(DispositionTimePeriod.DispositionOutOfHoursTimeFrameInShoulder, result); }
public void GetServiceAvailability_In_shoulder_And_Timeframe_Out_of_hours_Test() { var inShoulderDateTime = new DateTime(2016, 11, 17, 8, 20, 0); _mockProfileHoursOfConfiguration .Setup(c => c.GetServiceTime(inShoulderDateTime)) .Returns(ProfileServiceTimes.InHoursShoulder); _mockProfileHoursOfConfiguration .Setup(c => c.GetServiceTime(inShoulderDateTime.AddMinutes(720))) .Returns(ProfileServiceTimes.OutOfHours); _serviceAvailabilityProfile = new ServiceAvailabilityProfile(_mockProfileHoursOfConfiguration.Object, FILTERED_DOS_SERVICCE_TYPES); var result = _serviceAvailabilityProfile.GetServiceAvailability(inShoulderDateTime, 720); Assert.AreEqual(DispositionTimePeriod.DispositionInShoulderTimeFrameOutOfHours, result); }