public void GetDisponibilityNowAnd1Hour()
        {
            const string shopName   = "name";
            Guid         shopId     = Guid.NewGuid();
            var          returnShop = new Shop("codigo", shopName)
            {
                Id    = shopId,
                Turns = new List <Turn>()
            };
            var date = new DateTime(2020, 5, 6, 9, 0, 0);

            do
            {
                if (new DateTime(2020, 5, 6, 10, 0, 0) != date && new DateTime(2020, 5, 6, 11, 10, 0) != date)
                {
                    returnShop.Turns.Add(new Turn(shopId, date, "pepe", new List <int>()));
                }
                date = date.AddMinutes(5);
            } while (date.Hour < 20);
            var model = new GetDisponibilityShopModel()
            {
                Code = "codigo"
            };

            _shopRepo.Setup(x => x.GetByCodeWithTurns(It.IsAny <string>()))
            .Returns(returnShop)
            .Verifiable();
            _utilDateTime.Setup(x => x.GetNow())
            .Returns(new DateTime(2020, 5, 6, 10, 0, 0))
            .Verifiable();

            var expected = new GetDisponibilityShopResponse()
            {
                ShopId   = shopId,
                ShopName = shopName,
                Hours    = new List <HourDisponibilityShop>()
                {
                    new HourDisponibilityShop()
                    {
                        Range = HoursDisponibilityRange.Now
                    },
                    new HourDisponibilityShop()
                    {
                        Range = HoursDisponibilityRange.Hour1
                    },
                }
            };

            var resolve = _service.Execute(model);

            Assert.Equal(expected.ShopId, resolve.ShopId);
            Assert.Equal(expected.ShopName, resolve.ShopName);
            Assert.Equal(
                JsonConvert.SerializeObject(expected.Hours.OrderBy(h => h.Range)),
                JsonConvert.SerializeObject(resolve.Hours.OrderBy(h => h.Range))
                );

            _shopRepo.VerifyAll();
            _utilDateTime.VerifyAll();
        }
        public void GetDisponibilityWhereSopClosed()
        {
            const string shopName   = "name";
            Guid         shopId     = Guid.NewGuid();
            var          returnShop = new Shop("codigo", shopName)
            {
                Id = shopId
            };
            var model = new GetDisponibilityShopModel()
            {
                Code = "codigo"
            };

            _shopRepo.Setup(x => x.GetByCodeWithTurns(It.IsAny <string>()))
            .Returns(returnShop)
            .Verifiable();
            _utilDateTime.Setup(x => x.GetNow())
            .Returns(new DateTime(2020, 5, 6, 0, 0, 0))
            .Verifiable();

            var expected = new GetDisponibilityShopResponse()
            {
                ShopId   = shopId,
                ShopName = shopName,
                Hours    = new List <HourDisponibilityShop>()
                {
                }
            };

            var resolve = _service.Execute(model);

            Assert.Equal(expected.ShopId, resolve.ShopId);
            Assert.Equal(expected.ShopName, resolve.ShopName);
            Assert.Equal(
                JsonConvert.SerializeObject(expected.Hours.OrderBy(h => h.Range)),
                JsonConvert.SerializeObject(resolve.Hours.OrderBy(h => h.Range))
                );

            _shopRepo.VerifyAll();
            _utilDateTime.VerifyAll();
        }