protected HDNhapPhuTung CreateNewHDNhapPhuTung()
        {
            HDNhapPhuTung entity = new HDNhapPhuTung();


            entity.NgayNhap  = DateTime.Now;
            entity.ThanhTien = 9;
            entity.GhiChu    = "Test Test ";

            return(entity);
        }
        public void Create()
        {
            try
            {
                HDNhapPhuTung entity = CreateNewHDNhapPhuTung();

                object result = manager.Save(entity);

                Assert.IsNotNull(result);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }
        public void Delete()
        {
            try
            {
                HDNhapPhuTung entity = GetFirstHDNhapPhuTung();

                manager.Delete(entity);

                entity = manager.GetById(entity.Id);
                Assert.IsNull(entity);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }
        public void Read()
        {
            try
            {
                HDNhapPhuTung entityA = CreateNewHDNhapPhuTung();
                manager.Save(entityA);

                HDNhapPhuTung entityB = manager.GetById(entityA.Id);

                Assert.AreEqual(entityA, entityB);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }
        public void Update()
        {
            try
            {
                HDNhapPhuTung entityA = GetFirstHDNhapPhuTung();
                entityA.NgayNhap = DateTime.Now;

                manager.Update(entityA);

                HDNhapPhuTung entityB = manager.GetById(entityA.Id);

                Assert.AreEqual(entityA.NgayNhap, entityB.NgayNhap);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }