Ejemplo n.º 1
0
 public void Initialize()
 {
     // Arrange
     var cookerRepo = new FakeCookerRepository();
     var uow = new UnitofWork { CookerRepository = cookerRepo };
        // Controller = new OwnersController(uow);
 }
Ejemplo n.º 2
0
        public SubscriptionHelper(UnitofWork uow)
        {
            _myClientSubscriptions = uow.ClientSubscriptionRepository.All.ToList();

            _myClientOrdersToReview = uow.ClientOrderToReviewRepository.All.ToList();
            _myCookerSubscriptions = uow.CookerSubscriptionRepository.All.ToList();
            _myCookerServingsPrice = uow.ServingPriceRepository.All.ToList();
            _cookers = new FakeCookers().MyCookers;
        }
Ejemplo n.º 3
0
        public SubscriptionCharge(ClientAddress deliveryAddress = null, UnitofWork uow = null)
        {
            _subscriptionHelper = uow == null ? new SubscriptionHelper() : new SubscriptionHelper(uow);

            _orderCharge= new OrderChargeModel();
            if (deliveryAddress != null)
            {
                _deliveryAddress = deliveryAddress;
            }
        }
Ejemplo n.º 4
0
        public OrderCharge(ClientAddress deliveryAddress = null, UnitofWork uow = null)
        {
            if (uow == null)
            {
                _orderItem = new FakeOrderItems().MyOrderItems;
                _deliveryZones = new FakeDeliveryZone().MyDeliveryZones;
                _cookerDeliveryZones = new FakeCookerDeliveryZone().MyCookerDeliveryZones;
                _promotions = new FakePromotions().MyPromotions;
                _coupons = new FakeCoupons().MyCoupons;
            }
            else
            {
                _orderItem = uow.OrderItemRepository.All.ToList();
                _deliveryZones = uow.DeliveryZoneRepository.All.ToList();
                _cookerDeliveryZones = uow.CookerDeliveryZoneRepository.All.ToList();
                _promotions = uow.PromotionRepository.All.ToList();
                _coupons = uow.CouponRepository.All.ToList();
            }

            if (deliveryAddress != null)
            {
                _deliveryAddress = deliveryAddress;
            }
        }
Ejemplo n.º 5
0
 public void Initialize()
 {
     _uow = new UnitofWorkHelper().GetAllRepository();
 }