public override void Initialize() { base.Initialize(); this.redirectUrlServiceMock = new Mock <IRedirectUrlService>(); this.mappingEngineMock = new Mock <IMappingEngine>(); this.localizeTextServiceMock = new Mock <ILocalizedTextService>(); this.contentServiceMock = new Mock <IContentService>(); this.domainServiceMock = new Mock <IDomainService>(); SettingsForTests.ConfigureSettings(SettingsForTests.GenerateMockSettings()); var umbracoContext = this.GetUmbracoContext("http://localhost", -1, new RouteData(), false); this.controller = new RedirectsApiController(umbracoContext, this.redirectUrlServiceMock.Object, this.mappingEngineMock.Object, this.Logger, this.localizeTextServiceMock.Object, this.contentServiceMock.Object, this.domainServiceMock.Object) { Request = new HttpRequestMessage { Properties = { { HttpPropertyKeys.HttpConfigurationKey, new HttpConfiguration() } } } }; }
public override void TearDown() { this.controller = null; this.redirectUrlServiceMock = null; this.mappingEngineMock = null; this.localizeTextServiceMock = null; this.contentServiceMock = null; this.domainServiceMock = null; base.TearDown(); }