コード例 #1
0
 public CookerOrderReviewSent FirstCookerOrderReviewSent()
 {
     var firstCookerOrderReviewSent = new CookerOrderReviewSent
     {
         CookerOrderReviewSentId =  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 firstCookerOrderReviewSent;
 }
コード例 #2
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());
 }