Esempio n. 1
0
        public ActionResult RelaseDemand(RelaseDemandViewModel model)
        {
            Guid      userId = Guid.Parse(Session["UserId"].ToString());
            DemandDTO demand = new DemandDTO()
            {
                Content = model.Content, Introduction = model.Introduction, Title = model.Title, UserId = userId, IsHidden = true
            };
            IDemandManager demandManger = new DemandManager();

            demandManger.Release(demand);
            return(RedirectToAction("SucessResult", "Home"));
        }
Esempio n. 2
0
        public void TestMethod2()
        {
            DemandManager dm = new DemandManager();

            dm.Release(new Domain.DTO.DemandDTO()
            {
                Content      = "这是2句话,这是3句话,这是4句话,这是5句话,这是6句话,这是6句话,",
                Title        = "这是一句标题",
                Introduction = "123123",
                UserId       = Guid.Parse("d575d2d9-3a22-4465-9fe3-259ab0391988")
            });
            //foreach (var item in dm.GetAllDemand())
            //{
            //    Assert.AreEqual(Guid.Parse("1e38e6a5-1684-4b2c-95de-196b8bf7690"), item.UserId);
            //}
        }