Esempio n. 1
0
        public void CreateViewText()
        {
            var res = controller.CreateText(7);

            Assert.IsInstanceOfType(res, typeof(ViewResult));
            var viewRes = res as ViewResult;

            Assert.IsInstanceOfType(viewRes.Model, typeof(TextQuestion));
            Assert.AreEqual(7, (viewRes.Model as Question).TestID);
            Assert.IsTrue(viewRes.ViewBag.Create);
        }