public void Update_TestCase10() { ChiTietDonThuocDAO dao = new ChiTietDonThuocDAO(); CHITIETDONTHUOC chiTietDonThuoc = new CHITIETDONTHUOC { MaDonThuoc = TestCommon.LEN_10, MaThuoc = TestCommon.LEN_10, SoLuong = 10, GhiChu = TestCommon.LEN_250 }; dao.Save(db, chiTietDonThuoc); CHITIETDONTHUOC chiTietDonThuocUpdate = new CHITIETDONTHUOC { MaDonThuoc = TestCommon.LEN_10, MaThuoc = TestCommon.LEN_10, SoLuong = -10, GhiChu = "abc" }; string actual = dao.Save(db, chiTietDonThuocUpdate); // Biến kết quả string expected = "1111"; // Test Assert.Equals(expected, actual); }
public string SaveChiTietDonThuoc(QLPHONGKHAMEntities db, ChiTietDonThuocDTO ChiTietDonThuocEntity) { // convert DTO -> DAO CHITIETDONTHUOC chiTietDonThuoc = new CHITIETDONTHUOC(); BUS.Com.Utils.CopyPropertiesFrom(ChiTietDonThuocEntity, chiTietDonThuoc); // save return(chiTietDonThuocDAO.Save(db, chiTietDonThuoc)); }
public void Insert_TestCase4() { CHITIETDONTHUOC chiTietDonThuoc = new CHITIETDONTHUOC { }; ChiTietDonThuocDAO dao = new ChiTietDonThuocDAO(); string actual = dao.Save(db, chiTietDonThuoc); string expected = "1111"; Assert.Equals(expected, actual); }
public void Delete_TestCase11() { CHITIETDONTHUOC chiTietDonThuoc = new CHITIETDONTHUOC { MaDonThuoc = TestCommon.LEN_10 + "1", MaThuoc = TestCommon.LEN_10 + "1", SoLuong = 123, GhiChu = "abc" }; ChiTietDonThuocDAO dao = new ChiTietDonThuocDAO(); string actual = dao.Save(db, chiTietDonThuoc); Assert.Equals(null, actual); }
public void Insert_TestCase2() { CHITIETDONTHUOC chiTietDonThuoc = new CHITIETDONTHUOC { MaDonThuoc = TestCommon.LEN_10 + "1", MaThuoc = TestCommon.LEN_10 + "1", SoLuong = 10, GhiChu = TestCommon.LEN_250 + "1" }; ChiTietDonThuocDAO dao = new ChiTietDonThuocDAO(); string actual = dao.Save(db, chiTietDonThuoc); string expected = "1111"; Assert.Equals(expected, actual); }