protected override void Context() { _view = A.Fake <IEditTableFormulaWithOffsetFormulaView>(); _mapper = A.Fake <ITableFormulaWithOffsetToTableFormulaWithOffsetDTOMapper>(); _context = A.Fake <IMoBiContext>(); _mobiFormulaTask = A.Fake <IMoBiFormulaTask>(); _displayUnitRetriever = A.Fake <IDisplayUnitRetriever>(); _applicationController = A.Fake <IApplicationController>(); _selectReferencePresenterFactory = A.Fake <ISelectReferencePresenterFactory>(); _timeDimension = DomainHelperForSpecs.TimeDimension; A.CallTo(() => _context.DimensionFactory.Dimension(Constants.Dimension.TIME)).Returns(_timeDimension); sut = new EditTableFormulaWithOffsetFormulaPresenter(_view, _mapper, _context, _mobiFormulaTask, _displayUnitRetriever, _applicationController, _selectReferencePresenterFactory); _commandCollector = A.Fake <ICommandCollector>(); _buildingBlock = A.Fake <IBuildingBlock>(); sut.InitializeWith(_commandCollector); sut.BuildingBlock = _buildingBlock; _formula = new TableFormulaWithOffset(); _usingFormula = new Parameter(); _dto = new TableFormulaWithOffsetDTO(); _selectFormulaUsablePathPresenter = A.Fake <ISelectFormulaUsablePathPresenter>(); A.CallTo(() => _applicationController.Start <ISelectFormulaUsablePathPresenter>()).Returns(_selectFormulaUsablePathPresenter); _selectReferenceAtParameterPresenter = A.Fake <ISelectReferenceAtParameterPresenter>(); A.CallTo(_selectReferencePresenterFactory).WithReturnType <ISelectReferenceAtParameterPresenter>().Returns(_selectReferenceAtParameterPresenter); A.CallTo(() => _selectFormulaUsablePathPresenter.Init(A <Func <IObjectBase, bool> > ._, _usingFormula, A <IEnumerable <IObjectBase> > ._, A <string> ._, _selectReferenceAtParameterPresenter)) .Invokes(x => _predicate = x.GetArgument <Func <IObjectBase, bool> >(0)); }
public void BindTo(TableFormulaWithOffsetDTO tableFormulaWithOffsetDTO) { showOffsetObjectPath(tableFormulaWithOffsetDTO.OffsetObjectPath); showTableObjectPath(tableFormulaWithOffsetDTO.TableObjectPath); }
private void bindToView() { _tableFormulaWithOffsetDTO = _mapper.MapFrom(_formula); _view.BindTo(_tableFormulaWithOffsetDTO); }