protected override void Context() { _view = A.Fake <IEditTableFormulaWithXArgumentFormulaView>(); _mapper = A.Fake <ITableFormulaWithXArgumentToTableFormulaWithXArgumentDTOMapper>(); _formulaTask = A.Fake <IMoBiFormulaTask>(); _displayUnitRetriever = A.Fake <IDisplayUnitRetriever>(); _applicationController = A.Fake <IApplicationController>(); _selectReferencePresenterFactory = A.Fake <ISelectReferencePresenterFactory>(); _commandCollector = A.Fake <ICommandCollector>(); sut = new EditTableFormulaWithXArgumentFormulaPresenter(_view, _mapper, _formulaTask, _displayUnitRetriever, _applicationController, _selectReferencePresenterFactory); _tableFormulaWithXArgument = new TableFormulaWithXArgument(); _parameter = new Parameter().WithName("Parameter"); _container = new Container().WithName("Parent"); _container.Add(_parameter); _referencePresenter = A.Fake <ISelectReferenceAtParameterPresenter>(); _selectFormulaUsablePathPresenter = A.Fake <ISelectFormulaUsablePathPresenter>(); _buildingBlock = A.Fake <IBuildingBlock>(); A.CallTo(() => _selectReferencePresenterFactory.ReferenceAtParameterFor(_container)).Returns(_referencePresenter); A.CallTo(() => _applicationController.Start <ISelectFormulaUsablePathPresenter>()).Returns(_selectFormulaUsablePathPresenter); sut.BuildingBlock = _buildingBlock; sut.InitializeWith(_commandCollector); }
public EditTableFormulaWithXArgumentFormulaPresenter( IEditTableFormulaWithXArgumentFormulaView view, ITableFormulaWithXArgumentToTableFormulaWithXArgumentDTOMapper mapper, IMoBiFormulaTask moBiFormulaTask, IDisplayUnitRetriever displayUnitRetriever, IApplicationController applicationController, ISelectReferencePresenterFactory selectReferencePresenterFactory) : base(view, displayUnitRetriever) { _mapper = mapper; _moBiFormulaTask = moBiFormulaTask; _applicationController = applicationController; _selectReferencePresenterFactory = selectReferencePresenterFactory; }