コード例 #1
0
        public void TestAddNewAd()
        {
            TaskController taskController = new TaskController();
            var            result         = taskController.AddNewAd(user.Username) as ViewResult;
            var            viewData       = result.ViewData;

            Assert.AreEqual("Views/Task/AddNewAdView.cshtml", result.ViewName);
            Assert.AreEqual(user.Username, viewData["username"]);
        }