public void InitMVP() { view = new MockApprovals(); ordersService = new MockOrdersService(); ordersConverter = new OrdersConverter(new MockCustomerService(), new MockEmployeeService(), new MockGenericConverter <Employee, EmployeeDisplay>()); httpContextLocatorService = new MockHttpContextLocatorService(); presenter = new ApprovalsPresenter(ordersService, ordersConverter, httpContextLocatorService); presenter.View = view; }
public void InitMVP() { view = new MockSavedDrafts(); ordersService = new MockOrdersService(); ordersController = new MockOrdersController(); ordersConverter = new OrderManagement.Orders.Converters.OrdersConverter(new MockCustomerService(), new MockEmployeeService(), new MockGenericConverter <Employee, EmployeeDisplay>()); httpContextLocatorService = new MockHttpContextLocatorService(); presenter = new SavedDraftsPresenter(ordersService, ordersController, ordersConverter, httpContextLocatorService); presenter.View = view; }
public void LoadCallsAddModuleServices() { TestableRootCompositionContainer parentContainer = new TestableRootCompositionContainer(); TestableRootCompositionContainer container = parentContainer.Containers.AddNew <TestableRootCompositionContainer>("TEST"); TestableModuleInitializer moduleInitializer = new TestableModuleInitializer(); IHttpContextLocatorService contextLocator = new MockHttpContextLocatorService(); container.Services.Add <IHttpContextLocatorService>(contextLocator); moduleInitializer.Load(container); Assert.IsTrue(moduleInitializer.AddModuleServicesWasCalled); }
public void LoadCallsRegisterSiteMapInformation() { TestableRootCompositionContainer parentContainer = new TestableRootCompositionContainer(); TestableRootCompositionContainer container = parentContainer.Containers.AddNew <TestableRootCompositionContainer>("TEST"); TestableCustomersModuleInitializer moduleInitializer = new TestableCustomersModuleInitializer(); ISiteMapBuilderService siteMapBuilder = new MockSiteMapBuilderService(); IHttpContextLocatorService contextLocator = new MockHttpContextLocatorService(); container.Services.Add <IHttpContextLocatorService>(contextLocator); container.Services.Add <ISiteMapBuilderService>(siteMapBuilder); moduleInitializer.Load(container); Assert.IsTrue(moduleInitializer.RegisterSiteMapWasCalled); }