public void LayDanhSachTaiKhoan_TestStatusResponse() { Data_Test data_Test = new Data_Test(); var count = data_Test.DemSoLuongTaiKhoan(); //Act IHttpActionResult actionResult = controller.LayDanhSachTaiKhoan(); var actual_result = actionResult as OkNegotiatedContentResult <List <UserMasterDTO> >; //Assert Assert.AreEqual(count, actual_result.Content.Count); }
public void CapNhatTaiKhoan_TestStatusResponse() { Data_Test data_Test = new Data_Test(); var newAccount = data_Test.TaiKhoan(); // Act IHttpActionResult actionResult = controller.CapNhatTaiKhoan(newAccount); var actual_result = actionResult as OkNegotiatedContentResult <string>; // Assert try { Assert.AreEqual("Cập nhật tài khoản thành công!", actual_result.Content); } catch (System.Exception) { Assert.IsNotNull(actual_result.Content); } }
public QuanLy_UnitTest() { data_test = new Data_Test(); controller = new QuanLyController(); }
public Home_UnitTest() { data_test = new Data_Test(); controller = new HomeController(); }
public NhanVien_UnitTest() { data_test = new Data_Test(); controller = new NhanVienController(); business = new NhanVienBusiness(); }
public KhachHang_UnitTest() { data_test = new Data_Test(); controller = new KhachHangController(); }