Ejemplo n.º 1
0
        //test insert true
        public void TestKhachHang_Insert()
        {
            _khxl = new KhachHangXuLy();
            bool actual;

            try
            {
                KhachHang kh = new KhachHang();
                kh.MaKh      = "KH9";
                kh.TenKh     = "Test";
                kh.DiaChi    = "Test";
                kh.DienThoai = "123456789";
                kh.Email     = "Test";
                kh.NgaySinh  = DateTime.Now;
                kh.TinhTrang = "Test";
                _khxl.KhachHang_Insert(kh);
                actual = true;
            }
            catch (Exception)
            {
                actual = false;
            }
            Assert.AreEqual(true, actual);
            KhachHang kh1 = new KhachHang();

            kh1.MaKh = "KH9";
            _khxl.KhachHang_Delete(kh1);
        }
Ejemplo n.º 2
0
        //test delete
        public void TestKhachHang_Delete()
        {
            _khxl = new KhachHangXuLy();
            bool actual;

            try
            {
                KhachHang kh = new KhachHang();
                kh.MaKh = "KH9";
                _khxl.KhachHang_Delete(kh);
                actual = true;
            }
            catch (Exception)
            {
                actual = false;
            }
            Assert.AreEqual(true, actual);
        }