public void ShouldBeClosed20180930_1000() { var sut = new OpeningHoursChecker(); bool result = sut.IsOpenAt(new DateTime(2018, 9, 30, 10, 0, 0)); Assert.Equal(false, result); }
public void ShouldBeOpen20181002_1900() { var sut = new OpeningHoursChecker(); bool result = sut.IsOpenAt(new DateTime(2018, 10, 2, 19, 0, 0)); Assert.Equal(true, result); }
public void ShouldBeClosed20181002_1901() { var sut = new OpeningHoursChecker(); bool result = sut.IsOpenAt(new DateTime(2018, 10, 2, 19, 1, 0)); Assert.Equal(false, result); }
public bool IsOpenAt([FromQuery] int year, [FromQuery] int month, [FromQuery] int day, [FromQuery] int hour, [FromQuery] int minute) { var sut = new OpeningHoursChecker(); DateTime adate = new DateTime(year, month, day, hour, minute, 0); return(sut.IsOpenAt(adate)); }