Ejemplo n.º 1
0
        public void Update_TestCase9()
        {
            LuonCongViecDAO dao          = new LuonCongViecDAO();
            LUONCONGVIEC    luonCongViec = new LUONCONGVIEC
            {
                MaHoSo      = TestCommon.LEN_10,
                NodeHienTai = "12345",
                TiepNhan    = false,
                KhamBenh    = false,
                XetNghiem   = false
            };

            dao.Save(db, luonCongViec);
            LUONCONGVIEC luonCongViecUpdate = new LUONCONGVIEC
            {
                MaHoSo      = "1234",
                NodeHienTai = "12345",
                TiepNhan    = false,
                KhamBenh    = true,
                XetNghiem   = true
            };
            string actual = dao.Save(db, luonCongViecUpdate);
            // Biến kết quả
            string expected = "1111";

            // Test
            Assert.Equals(expected, actual);
        }
Ejemplo n.º 2
0
        public string UpdateLuonCongViec(QLPHONGKHAMEntities db, LuonCongViecDTO LuonCongViec)
        {
            LUONCONGVIEC luonCongViecDAO = new LUONCONGVIEC();

            BUS.Com.Utils.CopyPropertiesFrom(LuonCongViec, luonCongViecDAO);
            return(luonCongViecService.Save(db, luonCongViecDAO));
        }
Ejemplo n.º 3
0
        public void Insert_TestCase2()
        {
            LUONCONGVIEC luonCongViec = new LUONCONGVIEC
            {
                NodeHienTai = "12345",
                TiepNhan    = true,
                KhamBenh    = true,
                XetNghiem   = true
            };
            LuonCongViecDAO dao      = new LuonCongViecDAO();
            string          actual   = dao.Save(db, luonCongViec);
            string          expected = "1111";

            Assert.Equals(expected, actual);
        }
Ejemplo n.º 4
0
        public void Delete_TestCase10()
        {
            LUONCONGVIEC luonCongViec = new LUONCONGVIEC
            {
                MaHoSo      = TestCommon.LEN_10,
                NodeHienTai = "12345",
                TiepNhan    = true,
                KhamBenh    = true,
                XetNghiem   = true
            };
            LuonCongViecDAO dao    = new LuonCongViecDAO();
            string          actual = dao.Save(db, luonCongViec);

            Assert.Equals(null, actual);
        }
Ejemplo n.º 5
0
        public string GetInformationLuonCongViec(QLPHONGKHAMEntities db, string MaHoSo, out LuonCongViecDTO LuonCongViecEntity)
        {
            LuonCongViecEntity = new LuonCongViecDTO();
            LUONCONGVIEC entity = null;

            object[] id = { MaHoSo };
            if (luonCongViecService.FindById(db, id, out entity) == Constant.RES_FAI)
            {
                return(Constant.RES_FAI);
            }
            if (entity == null)
            {
                return(Constant.RES_FAI);
            }
            BUS.Com.Utils.CopyPropertiesFrom(entity, LuonCongViecEntity);
            return(Constant.RES_SUC);
        }
Ejemplo n.º 6
0
        public void Update_TestCase8()
        {
            LuonCongViecDAO dao          = new LuonCongViecDAO();
            LUONCONGVIEC    luonCongViec = new LUONCONGVIEC
            {
                MaHoSo      = TestCommon.LEN_10,
                NodeHienTai = "12345",
            };

            dao.Save(db, luonCongViec);
            LUONCONGVIEC luonCongViecUpdate = new LUONCONGVIEC
            {
                MaHoSo      = TestCommon.LEN_10 + "1",
                NodeHienTai = "123456",
            };
            string actual = dao.Save(db, luonCongViecUpdate);
            // Biến kết quả
            string expected = "1111";

            // Test
            Assert.Equals(expected, actual);
        }