public OrderSubscriptionItem GetFourthOrderSubscriptionItem()
 {
     var selectedDish = new FakeCooker1Dishes().SoupAndSaladDish1();
     var fourthSubscriptionOrderItemDetail = new OrderSubscriptionItem
     {
         OrderSubscriptionItemId = 4,
         DishId = selectedDish.DishId,
         CookerId = selectedDish.CookerId,
         MenuId = selectedDish.MenuId,
         Quantity = 1,
         Description = selectedDish.Description,
         Instructions = null,
         OrderSubscriptionId = 1,
         ClientOrderReviewSentClientOrderReviewSentId = new SubscriptionHelper().CreateOrderReview(selectedDish, _myOrders.Max(x => x.OrderSubscriptionId) + 1).ClientOrderToReviewId,
         WeekId = 4,
         ScheduledDate = DateTime.Today.Date.AddDays(1),
         OrderStatusId = (int)OrderStatus.Values.Scheduled
     };
     return fourthSubscriptionOrderItemDetail;
 }
        public OrderSubscriptionItem GetFirstOrderSubscriptionItem()
        {
            var selectedDish = new FakeCooker1Dishes().MostPopularDish1();
            var firstSubscriptionOrderItemDetail = new OrderSubscriptionItem
            {
                OrderSubscriptionItemId = 1,
                DishId = selectedDish.DishId,
                CookerId = selectedDish.CookerId,
                MenuId = selectedDish.MenuId,
                Quantity = 1,
                Description = selectedDish.Description,
                Instructions = "Put Extra French Fries",
                OrderSubscriptionId = 1,
                ClientOrderReviewSentClientOrderReviewSentId = new SubscriptionHelper().CreateOrderReview(selectedDish, _myOrders.Max(x => x.OrderSubscriptionId) + 1).ClientOrderToReviewId,
                WeekId = 1,
                ScheduledDate = DateTime.Today.Date,
                OrderStatusId = (int)OrderStatus.Values.Scheduled
            };

            firstSubscriptionOrderItemDetail.OrderSubscriptionItemDishOptions.Add(new FakeSubscriptionOrderItemDishOptions().FirstSubscriptionOrderItemDishOption());
            firstSubscriptionOrderItemDetail.OrderSubscriptionItemDishOptions.Add(new FakeSubscriptionOrderItemDishOptions().SecondSubscriptionOrderItemDishOption());
            return firstSubscriptionOrderItemDetail;
        }
 private OrderSubscriptionItem GetThirdOrderSubscriptionItem(int weekId)
 {
     var selectedDish = new FakeCooker1Dishes().SoupAndSaladDish1();
     var thirdSubscriptionOrderItemDetail = new OrderSubscriptionItem
     {
         OrderSubscriptionItemId = 3,
         DishId = selectedDish.DishId,
         CookerId = selectedDish.CookerId,
         MenuId = selectedDish.MenuId,
         Quantity = 1,
         Description = selectedDish.Description,
         Instructions = null,
         OrderSubscriptionId = GetFakeOrderSubscriptionId(),
         ClientOrderReviewSentClientOrderReviewSentId = new SubscriptionHelper().CreateOrderReview(selectedDish, GetFakeOrderSubscriptionId()).ClientOrderToReviewId,
         WeekId = weekId,
         ScheduledDate = DateTime.Today.Date.AddDays(4),
         OrderStatusId = (int)OrderStatus.Values.Scheduled
     };
     return thirdSubscriptionOrderItemDetail;
 }
        private OrderSubscriptionItem GetSecondOrderSubscriptionItem(int weekId)
        {
            var selectedDish = new FakeCooker1Dishes().MostPopularDish2();
            var secondSubscriptionOrderItemDetail = new OrderSubscriptionItem
            {
                OrderSubscriptionItemId = 2,
                DishId = selectedDish.DishId,
                CookerId = selectedDish.CookerId,
                MenuId = selectedDish.MenuId,
                Quantity = 1,
                Description = selectedDish.Description,
                Instructions = "Put Extra Spices",
                OrderSubscriptionId = GetFakeOrderSubscriptionId(),
                ClientOrderReviewSentClientOrderReviewSentId = new SubscriptionHelper().CreateOrderReview(selectedDish, GetFakeOrderSubscriptionId()).ClientOrderToReviewId,
                WeekId = weekId,
                ScheduledDate = DateTime.Today.Date.AddDays(2),
                OrderStatusId = (int)OrderStatus.Values.Scheduled
            };

            //Required Side
            var secondOrderDetailOption = new OrderSubscriptionItemDishOption
            {
                OrderSubscriptionItemDishOptionId = 3,
                DishOptionChoiceId = 14,
                DishOptionChoiceValue = "New York Strip Steak",
                DishOptionId = (int)DishOptionType.Values.FakeRequiredSideThreeOptionChoices,
                Instructions = "no Mayone Please",
                OrderSubscriptionItemId = 2
            };
            secondSubscriptionOrderItemDetail.OrderSubscriptionItemDishOptions.Add(secondOrderDetailOption);
            return secondSubscriptionOrderItemDetail;
        }
        private OrderSubscriptionItem GetFirstOrderSubscriptionItem(int weekId)
        {
            var selectedDish = new FakeCooker1Dishes().MostPopularDish1();
            var firstSubscriptionOrderItemDetail = new OrderSubscriptionItem
            {
                OrderSubscriptionItemId = 1,
                DishId = selectedDish.DishId,
                CookerId = selectedDish.CookerId,
                MenuId = selectedDish.MenuId,
                Quantity = 1,
                Description = selectedDish.Description,
                Instructions = "Put Extra French Fries",
                OrderSubscriptionId = GetFakeOrderSubscriptionId(),
                ClientOrderReviewSentClientOrderReviewSentId = new SubscriptionHelper().CreateOrderReview(selectedDish, GetFakeOrderSubscriptionId()).ClientOrderToReviewId,
                WeekId = weekId,
                ScheduledDate = DateTime.Today.Date,
                OrderStatusId = (int)OrderStatus.Values.Scheduled
            };

            //Required Side
            var firstOrderDetailOption = new OrderSubscriptionItemDishOption
            {
                OrderSubscriptionItemDishOptionId = 1,
                DishOptionChoiceId = 3,
                DishOptionChoiceValue = "Cucumber Salad",
                DishOptionId = (int)DishOptionType.Values.FakeRequiredSideTwelveOptionChoices,
                Instructions = "no Mayone Please",
                OrderSubscriptionItemId = 1
            };

            //Optional Side
            var secondOrderDetailOption = new OrderSubscriptionItemDishOption
            {
                OrderSubscriptionItemDishOptionId = 2,
                DishOptionChoiceId = 17,
                DishOptionChoiceValue = "House Salad",
                DishOptionId = (int)DishOptionType.Values.FakeOptionalSideThreeOptionChoices,
                Instructions = "More Lettuce",
                OrderSubscriptionItemId = 1
            };

            firstSubscriptionOrderItemDetail.OrderSubscriptionItemDishOptions.Add(firstOrderDetailOption);
            firstSubscriptionOrderItemDetail.OrderSubscriptionItemDishOptions.Add(secondOrderDetailOption);
            return firstSubscriptionOrderItemDetail;
        }
Exemplo n.º 6
0
        private OrderSubscriptionItem MostPopularDishFromCooker1MenuSubscriptionItem(int weekId)
        {
            var selectedDish = new FakeCooker1Dishes().MostPopularDish1();
            var subscriptionOrderItemDetail = new OrderSubscriptionItem
            {
                OrderSubscriptionItemId = 1,
                DishId = selectedDish.DishId,
                CookerId = selectedDish.CookerId,
                MenuId = selectedDish.MenuId,
                Quantity = 1,
                Description = selectedDish.Description,
                Instructions = "Put Extra French Fries",
                OrderSubscriptionId = _uow.OrderSubscriptionItemRepository.All.ToList().Max(x => x.OrderSubscriptionId) + 1,
                ClientOrderReviewSentClientOrderReviewSentId = new SubscriptionHelper().CreateOrderReview(selectedDish, _uow.OrderSubscriptionItemRepository.All.ToList().Max(x => x.OrderSubscriptionId) + 1).ClientOrderToReviewId,
                WeekId = weekId,
                ScheduledDate = DateTime.Today.Date,
                OrderStatusId = (int)OrderStatus.Values.Scheduled

            };
            return subscriptionOrderItemDetail;
        }
Exemplo n.º 7
0
 private CookerOrderToReview CreateCookerOrderToReview(OrderSubscriptionItem firstsubscriptionItemForWeek1)
 {
     Assert.AreEqual(0, _uow.CookerOrderToReviewRepository.FindBy(x => x.OrderId == firstsubscriptionItemForWeek1.OrderSubscriptionId).Count());
     // Cooker Order to Review
     var cookerOrderToReview = new CookerOrderToReview
     {
         CookerOrderToReviewId = _uow.CookerOrderToReviewRepository.All.ToList().Max(x => x.CookerOrderToReviewId) + 1,
         ClientId = 2,
         CookerId = firstsubscriptionItemForWeek1.CookerId,
         MenuId = firstsubscriptionItemForWeek1.MenuId,
         OrderId = firstsubscriptionItemForWeek1.OrderSubscriptionId,
         OverallFeedBackRating = 0,
         ItemAccuracyRating = 0,
         CommunicationRating = 0,
         DeliveryTimeRating = 0,
         Comment = null,
         Photo = null,
         OrderDate = DateTime.Today.Date,
         OrderModelTypeId = (int)OrderModelType.Values.Subscription
     };
     _uow.CookerOrderToReviewRepository.Add(cookerOrderToReview);
     _uow.Save();
     Assert.AreEqual(1, _uow.CookerOrderToReviewRepository.FindBy(x => x.OrderId == firstsubscriptionItemForWeek1.OrderSubscriptionId).Count());
     return cookerOrderToReview;
 }
Exemplo n.º 8
0
 private void CreateCookerOrderReviewSentToClient(OrderSubscriptionItem firstsubscriptionItemForWeek1)
 {
     Assert.AreEqual(0, _uow.CookerOrderReviewSentRepository.FindBy(x => x.OrderId == firstsubscriptionItemForWeek1.OrderSubscriptionId).Count());
     //Cooker Review Order
     var cookerOrderReviewSent = new CookerOrderReviewSent
     {
         CookerOrderReviewSentId =
             _uow.CookerOrderReviewSentRepository.All.ToList().Max(x => x.CookerOrderReviewSentId) + 1,
         ClientId = 2,
         CookerId = firstsubscriptionItemForWeek1.CookerId,
         MenuId = firstsubscriptionItemForWeek1.MenuId,
         OrderId = firstsubscriptionItemForWeek1.OrderSubscriptionId,
         OverallFeedBackRating = (int)RatingCodeType.Values.Positive,
         ItemAccuracyRating = 4,
         CommunicationRating = 3,
         DeliveryTimeRating = 2,
         Comment = null,
         Photo = null,
         OrderDate = DateTime.Today.Date,
         OrderModelTypeId = (int)OrderModelType.Values.Subscription
     };
     _uow.CookerOrderReviewSentRepository.Add(cookerOrderReviewSent);
     _uow.Save();
     Assert.AreEqual(1, _uow.CookerOrderReviewSentRepository.FindBy(x => x.OrderId == firstsubscriptionItemForWeek1.OrderSubscriptionId).Count());
 }
Exemplo n.º 9
0
 private CookerOrderReviewReceived CookerOrderReviewReceived(OrderSubscriptionItem firstsubscriptionItemForWeek1)
 {
     Assert.AreEqual(0, _uow.CookerOrderReviewReceivedRepository.FindBy(x => x.OrderId == firstsubscriptionItemForWeek1.OrderSubscriptionId).Count());
     //Cooker Review Received
     var cookerOrderReviewReceived = new CookerOrderReviewReceived
     {
         CookerOrderReviewReceivedId =
             _uow.CookerOrderReviewReceivedRepository.All.ToList().Max(x => x.CookerOrderReviewReceivedId) + 1,
         CookerId = firstsubscriptionItemForWeek1.CookerId,
         ClientId = 1,
         MenuId = firstsubscriptionItemForWeek1.MenuId,
         OrderId = firstsubscriptionItemForWeek1.OrderSubscriptionId,
         OverallFeedBackRating = (int)RatingCodeType.Values.Positive,
         ItemAccuracyRating = 4,
         CommunicationRating = 3,
         DeliveryTimeRating = 2,
         Comment = null,
         Photo = null,
         OrderDate = DateTime.Today.Date,
     };
     _uow.CookerOrderReviewReceivedRepository.Add(cookerOrderReviewReceived);
     _uow.Save();
     Assert.AreEqual(1, _uow.CookerOrderReviewReceivedRepository.FindBy(x => x.OrderId == firstsubscriptionItemForWeek1.OrderSubscriptionId).Count());
     return cookerOrderReviewReceived;
 }