public void TearDown() { mapper = null; planeRepository = null; part = null; partDto = null; userRepository = null; partService = null; }
public void UpdatePlanePart(PlanePartDto planePart) { try { _unit.Parts.UpdatePlanePart(_mapper.Map <PlanePart>(planePart)); } catch { //catch just not to stop the program } }
public void SetUp() { partDto = new PlanePartDto() { Id = 1, Description = "Some discription", Manufacturer = "The Boeing Company", ManufacturingDate = DateTime.UtcNow, Name = "Boeing 777 MAX", Price = 300 }; mapper = new DtoProfile().GetMapper(); part = mapper.Map <PlanePart>(partDto); planeRepository = new Mock <IPlaneModelRepository>(); userRepository = new Mock <IUserRepository>(); }