Пример #1
0
        //test insert true
        public void TestPhieuNhap_Insert()
        {
            _pnxl = new PhieuNhapXuLy();
            bool actual;

            try
            {
                PhieuNhap pn = new PhieuNhap();
                pn.MaPhieuNhap = "PN10";
                pn.NgayNhap    = DateTime.Now;
                pn.MaNv        = "NV1";
                pn.MaNhaCc     = "NCC1";
                _pnxl.PhieuNhap_Insert(pn);
                actual = true;
            }
            catch (Exception)
            {
                actual = false;
            }
            Assert.AreEqual(true, actual);
            PhieuNhap pn1 = new PhieuNhap();

            pn1.MaPhieuNhap = "PN10";
            _pnxl.PhieuNhap_Delete(pn1);
        }
Пример #2
0
        //test delete
        public void TestPhieuNhap_Delete()
        {
            _pnxl = new PhieuNhapXuLy();
            bool actual;

            try
            {
                PhieuNhap pn = new PhieuNhap();
                pn.MaPhieuNhap = "PN10";
                _pnxl.PhieuNhap_Delete(pn);
                actual = true;
            }
            catch (Exception)
            {
                actual = false;
            }
            Assert.AreEqual(true, actual);
        }