Beispiel #1
0
        public async Task ToValidateAllRemarksAreReturned()
        {
            var sut = new RemarkService(_mockLandmarkContext.Object);

            var result = await sut.GetAllRemarks();

            Assert.AreEqual(result.Count(), 3);
        }
Beispiel #2
0
        public async Task ShouldSuccessfullyAddARemark()
        {
            var sut = new RemarkService(_mockLandmarkContext.Object);

            var result = await sut.RemarkLandmark(new Remark()
            {
                Note = "abc", User = new User()
                {
                    Id = 2, Username = "******"
                }
            });

            _mockRemarkDbSet.Verify(m => m.Add(It.IsAny <Remark>()), Times.Once());
        }
Beispiel #3
0
        /// <summary>
        /// 获取备注数据
        /// </summary>
        /// <returns></returns>
        public ActionResult GetRemarks()
        {
            var remarks = new RemarkService().GetList().Select(x => x.RemarkDesc);

            return(Json(remarks, JsonRequestBehavior.AllowGet));
        }
 /// <summary>
 /// 订单备注
 /// </summary>
 private void OnOrderRemark(int?id)
 {
     RemarkService.ShowRemarkWin(id.Value.ToString(), EnumSetRemarkType.SetOrderRemark);
 }
 /// <summary>
 /// 发货单备注
 /// </summary>
 private void OnDeliveryOrderRemark(int?id)
 {
     RemarkService.ShowRemarkWin(id.Value.ToString(), EnumSetRemarkType.SetShipSaleRemark);
 }
 public RemarkController(RemarkService remarkService)
 {
     _remarkService = remarkService;
 }