Exemplo n.º 1
0
        public void TestMethod1()
        {
            var db         = new Expenditure99Entities();
            var controller = new ManagementController();
            var result     = controller.Index() as ViewResult;

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result.Model, typeof(List <QuanLyChiTieuCaNhan>));
            Assert.AreEqual(db.QuanLyChiTieuCaNhans.Count(), (result.Model as List <QuanLyChiTieuCaNhan>).Count);
        }
        public void Index()
        {
            //Arrange
            ManagementController Management = new ManagementController();

            //Act
            ActionResult result = Management.Index() as ActionResult;

            //Assert
            Assert.IsNotNull(result);
        }