public void TestInsert() { insured.FirstName = "FName"; insured.LastName = "LName"; insured.Age = 40; insuredBusiness.Insert(insured); Assert.IsTrue(insured.Id > 0); }
public ActionResult Save(ProposalViewModel obj) { try { ATMStagsReference.ATMStagsSoapClient atmStags = new ATMStagsReference.ATMStagsSoapClient(); ProposalBusiness proposalBusiness = new ProposalBusiness(); Proposal proposal = new Proposal(); proposal.Insured = new Insured(); proposal.Insured.FirstName = obj.FirstName; proposal.Insured.LastName = obj.LastName; proposal.Insured.Age = obj.Age; CarBusiness carBusiness = new CarBusiness(); proposal.Car = carBusiness.Find(obj.CarId); InsuredBusiness insuredBusiness = new InsuredBusiness(); insuredBusiness.Insert(proposal.Insured); proposalBusiness.Insert(proposal); atmStags.Debitar(300, 2); } catch (Exception ex) { } return(RedirectToAction("List", "Proposal")); }