public CookerOrderToReview FirstCookerOrderToReview()
 {
     var firstCookerOrderToReview = new CookerOrderToReview
     {
         CookerOrderToReviewId = 1,
         CookerId = 1,
         ClientId = 1,
         MenuId = 1,
         OrderId = 1,
         OverallFeedBackRating = 0,
         ItemAccuracyRating = 0,
         CommunicationRating = 0,
         DeliveryTimeRating = 0,
         Comment = null,
         Photo = null,
         OrderDate = DateTime.Today.Date,
        //ViewModel OrderItems = (from c in new FakeOrderItems().MyOrderItems where c.OrderId == 1 select c).ToList()
     };
     return firstCookerOrderToReview;
 }
示例#2
0
 private void DeleteCookerOrderToReview(CookerOrderToReview cookerOrderToReview)
 {
     Assert.AreEqual(1, _uow.CookerOrderToReviewRepository.FindBy(x => x.CookerOrderToReviewId == cookerOrderToReview.CookerOrderToReviewId).Count());
     _uow.CookerOrderToReviewRepository.Delete(cookerOrderToReview);
     _uow.Save();
     Assert.AreEqual(0, _uow.CookerOrderToReviewRepository.FindBy(x => x.CookerOrderToReviewId == cookerOrderToReview.CookerOrderToReviewId).Count());
 }
示例#3
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;
 }