Esempio n. 1
0
        public void GivenSaturdayHours_WhenAskingIsOpenSundayWithinSaturdayHours_ThenItShouldReturnFalse()
        {
            // arrange
            const string json  = "{'DayOfWeek':'Saturday','OpenTime':'06:00:00','CloseTime':'18:00:00'}";
            IHours       hours = JsonConvert.DeserializeObject <Hours>(json);

            // act
            bool actual = hours.IsOpen(DayOfWeek.Sunday, TimeSpan.Parse("12:00:00"));

            // assert
            actual.Should().BeFalse();
        }
Esempio n. 2
0
 /// <summary>
 /// Constructor that implements the interface IHour.
 /// </summary>
 /// <param name="hours"></param>
 public HoursPerYear(IHours hours)
 {
     this._hours = hours;
 }
Esempio n. 3
0
 /// <summary>
 /// Constructor that implements the interface IHour.
 /// </summary>
 /// <param name="hours"></param>
 public HoursPerWeek(IHours hours)
 {
     this._hours = hours;
 }
Esempio n. 4
0
 /// <summary>
 /// Constructor that implements the interface IHour.
 /// </summary>
 /// <param name="hours"></param>
 public HoursPerDay(IHours hours)
 {
     this._hours = hours;
 }
Esempio n. 5
0
 public UnknowTime(IHours hours)
 {
     this._hours = hours;
 }
Esempio n. 6
0
 /// <summary>
 /// Constructor that implements the interface IHour.
 /// </summary>
 /// <param name="hours"></param>
 public HoursPerMonth(IHours hours)
 {
     this._hours = hours;
 }
 public TimeConverter()
 {
     _seconds = new Seconds();
     _minutes = new Minutes();
     _hours   = new Hours();
 }