public void GetListThuoc_Testcase2() { List <ThuocDTO> listThuoc = null; ThuocBUS thuocBUS = new ThuocBUS(); string actual = thuocBUS.GetListThuoc(db, out listThuoc); string expected = "1111"; Assert.Equals(actual, expected); }
// lay danh sach thuoc public string GetListThuoc(out List <ThuocDTO> thuocs) { ThuocBUS thuocBUS = new ThuocBUS(); using (QLPHONGKHAMEntities db = new QLPHONGKHAMEntities()) { if (thuocBUS.GetListThuoc(db, out thuocs) == Constant.RES_FAI) { return(Constant.RES_FAI); } } if (thuocs == null) { return(Constant.RES_FAI); } return(Constant.RES_SUC); }
public void GetListThuoc_Testcase1() { // create data search db.THUOCs.Add(new THUOC { MaThuoc = "1234567890", TenThuoc = "aaaaaaaaaa" }); db.THUOCs.Add(new THUOC { MaThuoc = "1234567891", TenThuoc = "bbbbbbbbbb" }); db.THUOCs.Add(new THUOC { MaThuoc = "1234567892", TenThuoc = "cccccccccc" }); List <ThuocDTO> listThuoc = null; ThuocBUS thuocBUS = new ThuocBUS(); string actual = thuocBUS.GetListThuoc(db, out listThuoc); string expected = "0000"; Assert.Equals(actual, expected); }