Ejemplo n.º 1
0
        [InlineData("0 17 * * Sunday", "0 18 * * Sunday", 2021, 3, 28, 17, 59, 00, true)]  // Every sunday at 17:00-18:00, now is 28 of March 2021, sunday 17:59
        public void MapIsOpen(string openTime, string closeTime, int year, int month, int day, int hour, int minute, int second, bool isOpen)
        {
            var def = new MapDefinition()
            {
                OpenTime  = openTime,
                CloseTime = closeTime
            };

            var now = new DateTime(year, month, day, hour, minute, second);

            Assert.Equal(isOpen, def.IsOpen(now));
        }