/// <summary> /// Creates a new <see cref="AreaReportControllerTests"/> instance /// </summary> public SeedReportControllerTests() { // Configure repo mock this._repo = new Mock <IMatchMessageRepository>(); // Configure service this._service = new MessageService(this._repo.Object); // Configure controller this._controller = new SeedReportController(this._service); this._controller.ControllerContext = new ControllerContext(); this._controller.ControllerContext.HttpContext = new DefaultHttpContext(); }
/// <summary> /// Creates a new <see cref="AreaReportControllerTests"/> instance /// </summary> public SeedReportControllerTests() { // Configure repo mock this._repo = new Mock <IInfectionReportRepository>(); // Configure service this._service = new InfectionReportService(this._repo.Object); // Create AutoMapper instance MapperConfiguration mapperConfig = new MapperConfiguration( opts => opts.AddProfile <MappingProfiles>() ); IMapper mapper = mapperConfig.CreateMapper(); // Configure controller this._controller = new SeedReportController(mapper, this._service); this._controller.ControllerContext = new ControllerContext(); this._controller.ControllerContext.HttpContext = new DefaultHttpContext(); }