public CreateProtocolPresenter(ICreateProtocolView view, ISubPresenterItemManager <IProtocolItemPresenter> subPresenterItemManager, IBuildingBlockPropertiesMapper propertiesMapper, IProtocolChartPresenter protocolChartPresenter, IProtocolFactory protocolFactory, IProtocolUpdater protocolUpdater, IProtocolToProtocolPropertiesDTOMapper protocolPropertiesDTOMapper, IDialogCreator dialogCreator) : base(view, subPresenterItemManager, ProtocolItems.All, dialogCreator) { _propertiesMapper = propertiesMapper; _protocolChartPresenter = protocolChartPresenter; _protocolFactory = protocolFactory; _protocolUpdater = protocolUpdater; _protocolPropertiesDTOMapper = protocolPropertiesDTOMapper; }
protected override void Context() { _view = A.Fake <ICreateProtocolView>(); _propertiesMapper = A.Fake <IBuildingBlockPropertiesMapper>(); _simpleProtocolPresenter = A.Fake <ISimpleProtocolPresenter>(); _protocolFactory = A.Fake <IProtocolFactory>(); _propertiesDTOMapper = A.Fake <IProtocolToProtocolPropertiesDTOMapper>(); _advancedProtocolPresenter = A.Fake <IAdvancedProtocolPresenter>(); _protocolUpdater = A.Fake <IProtocolUpdater>(); _protocolChartPresenter = A.Fake <IProtocolChartPresenter>(); _subPresenterManager = A.Fake <ISubPresenterItemManager <IProtocolItemPresenter> >(); _dialogCreator = A.Fake <IDialogCreator>(); A.CallTo(() => _protocolFactory.Create(ProtocolMode.Simple)).Returns(new SimpleProtocol()); A.CallTo(() => _subPresenterManager.AllSubPresenters).Returns(new IProtocolItemPresenter[] { _simpleProtocolPresenter, _advancedProtocolPresenter }); sut = new CreateProtocolPresenter(_view, _subPresenterManager, _propertiesMapper, _protocolChartPresenter, _protocolFactory, _protocolUpdater, _propertiesDTOMapper, _dialogCreator); sut.Initialize(); }