//test insert true public void TestNhanVien_Insert() { _nvxl = new NhanVienXuLy(); bool actual; try { NhanVien nv = new NhanVien(); nv.MaNv = "NV10"; nv.TenNv = "Test"; nv.Luong = 1; nv.NgaySinh = DateTime.Now; nv.GioiTinh = "Test"; nv.DiaChi = "Test"; nv.DienThoai = "123456789"; nv.ChucVu = "Test"; nv.LuongCoBan = 2; nv.NgayVaoLam = DateTime.Now; _nvxl.NhanVien_Insert(nv); actual = true; } catch (Exception) { actual = false; } Assert.AreEqual(true, actual); NhanVien nv1 = new NhanVien(); nv1.MaNv = "NV10"; _nvxl.NhanVien_Delete(nv1); }
//test delete public void TestNhanVien_Delete() { _nvxl = new NhanVienXuLy(); bool actual; try { NhanVien nv = new NhanVien(); nv.MaNv = "NV10"; _nvxl.NhanVien_Delete(nv); actual = true; } catch (Exception) { actual = false; } Assert.AreEqual(true, actual); }