protected PhuTung GetFirstPhuTung()
        {
            IList <PhuTung> entityList = manager.GetAll(1);

            if (entityList.Count == 0)
            {
                Assert.Fail("All tables must have at least one row for unit tests to succeed.");
            }
            return(entityList[0]);
        }
Esempio n. 2
0
        protected CTHDNhapPhuTung CreateNewCTHDNhapPhuTung()
        {
            CTHDNhapPhuTung entity = new CTHDNhapPhuTung();


            entity.SoLuong    = 17;
            entity.DonGiaNhap = 32;
            entity.ThanhTien  = 18;
            entity.GhiChu     = "Test Test ";

            IHDNhapPhuTungManager hDNhapPhuTungManager = managerFactory.GetHDNhapPhuTungManager();

            entity.HDNhapPhuTungMember = hDNhapPhuTungManager.GetAll(1)[0];

            IPhuTungManager phuTungManager = managerFactory.GetPhuTungManager();

            entity.PhuTungMember = phuTungManager.GetAll(1)[0];

            return(entity);
        }
Esempio n. 3
0
        protected CTHDSuaXe CreateNewCTHDSuaXe()
        {
            CTHDSuaXe entity = new CTHDSuaXe();


            entity.STT          = 5;
            entity.ChiTietSua   = "Test Test Test Test T";
            entity.SoLuong      = 87;
            entity.DonGium      = 90;
            entity.PhanTramGiam = default(Double);
            entity.ThanhTien    = 81;
            entity.GhiChu       = "Test Test ";
            entity.Loai         = true;

            IHDSuaXeManager hDSuaXeManager = managerFactory.GetHDSuaXeManager();

            entity.HDSuaXeMember = hDSuaXeManager.GetAll(1)[0];

            IPhuTungManager phuTungManager = managerFactory.GetPhuTungManager();

            entity.PhuTungMember = phuTungManager.GetAll(1)[0];

            return(entity);
        }