GetDeliveryStatus() public method

计算餐厅是否可以送餐
public GetDeliveryStatus ( BusinessStatus status, DeliveryTime deliverTime ) : System.Boolean
status BusinessStatus 餐厅营业状态
deliverTime DeliveryTime 餐厅可以送餐时间
return System.Boolean
        public void OpenStatusInDeliveryTimeTest()
        {
            var deliveryTime = new DeliveryTime[1] 
            { 
                new DeliveryTime(new Time(DateTime.Now.AddHours(-3).Hour,0),new Time(DateTime.Now.AddHours(3).Hour,0))
            };

            var service = new DeliveryStatusService();

            var result = service.GetDeliveryStatus(BusinessStatus.Open, deliveryTime);

            Assert.IsTrue(result);
        }
        public void CloseStatusDeliveryStatusTest()
        {
            var deliveryTime = new DeliveryTime[2] 
            { 
                new DeliveryTime(new Time(12,0),new Time(13,0)),
                new DeliveryTime(new Time(18,0),new Time(19,0))
            };

            var service = new DeliveryStatusService();

            var result = service.GetDeliveryStatus(BusinessStatus.Close, deliveryTime);

            Assert.IsFalse(result);
        }