Exemple #1
0
        public ActionResult Myaccount()
        {
            Guid userId = Guid.Parse(Session["UserId"].ToString());
            MyaccountViewModel model          = new MyaccountViewModel();
            IOrderManager      orderManager   = new OrderManager();
            ICommentManager    commentManager = new CommentManager();
            IDemandManager     demandManager  = new DemandManager();

            model.orders   = orderManager.GetAllOrderByUserId(userId);
            model.demands  = demandManager.GetAllDemandByUserId(userId);
            model.comments = commentManager.GetAllCommentByUserId(userId);
            return(View(model));
        }
Exemple #2
0
        public void TestMethod4()
        {
            Guid userId = Guid.Parse(/*Session["UserId"].ToString()*/ "d575d2d9-3a22-4465-9fe3-259ab0391988");
            MyaccountViewModel model          = new MyaccountViewModel();
            IOrderManager      orderManager   = new OrderManager();
            ICommentManager    commentManager = new CommentManager();
            IDemandManager     demandManager  = new DemandManager();

            model.orders   = orderManager.GetAllOrderByUserId(userId);
            model.demands  = demandManager.GetAllDemandByUserId(userId);
            model.comments = commentManager.GetAllCommentByUserId(userId);
            Assert.IsNotNull(model.comments);
            Assert.IsNotNull(model.orders);
            Assert.IsNotNull(model.demands);
        }