protected override void Context() { _project = A.Fake <IPKSimProject>(); _entityTask = A.Fake <IEntityTask>(); _templateTaskQuery = A.Fake <ITemplateTaskQuery>(); _executionContext = A.Fake <IExecutionContext>(); A.CallTo(() => _executionContext.CurrentProject).Returns(_project); _applicationController = A.Fake <IApplicationController>(); _buildingBlockInSimulationManager = A.Fake <IBuildingBlockInSimulationManager>(); _buildingBlockRepository = A.Fake <IBuildingBlockRepository>(); _clonePresenter = A.Fake <ICloneBuildingBlockPresenter>(); _renamePresenter = A.Fake <IRenameObjectPresenter>(); _dialogCreator = A.Fake <IDialogCreator>(); _singleStartPresenterTask = A.Fake <ISingleStartPresenterTask>(); _lazyLoadTask = A.Fake <ILazyLoadTask>(); _presenterSettingsTask = A.Fake <IPresentationSettingsTask>(); _simulationReferenceUpdater = A.Fake <ISimulationReferenceUpdater>(); sut = new BuildingBlockTask(_executionContext, _applicationController, _dialogCreator, _buildingBlockInSimulationManager, _entityTask, _templateTaskQuery, _singleStartPresenterTask, _buildingBlockRepository, _lazyLoadTask, _presenterSettingsTask, _simulationReferenceUpdater); A.CallTo(() => _applicationController.Start <ICloneBuildingBlockPresenter>()).Returns(_clonePresenter); A.CallTo(() => _applicationController.Start <IRenameObjectPresenter>()).Returns(_renamePresenter); _buildingBlock = A.Fake <IPKSimBuildingBlock>(); }
protected override void Context() { _executionContext = A.Fake <IOSPSuiteExecutionContext>(); _eventPublisher = A.Fake <IEventPublisher>(); _project = A.Fake <IProject>(); _parameterIdentification = new ParameterIdentification(); _applicationController = A.Fake <IApplicationController>(); _renameObjectPresenter = A.Fake <IRenameObjectPresenter>(); A.CallTo(() => _applicationController.Start <IRenameObjectPresenter>()).Returns(_renameObjectPresenter); A.CallTo(() => _executionContext.Project).Returns(_project); A.CallTo(() => _renameObjectPresenter.NewNameFrom(_parameterIdentification, A <IEnumerable <string> > ._, A <string> ._)).Returns("newName"); A.CallTo(() => _project.AllParameterIdentifications).Returns(new[] { new ParameterIdentification { Name = "name1" }, new ParameterIdentification { Name = "name2" } }); sut = new RenameParameterIdentificationUICommand(_executionContext, _eventPublisher, _applicationController); sut.For(_parameterIdentification); }
protected override void Context() { _applicationController = A.Fake <IApplicationController>(); _executionContext = A.Fake <IExecutionContext>(); _entity = A.Fake <IEntity>(); _renamePresenter = A.Fake <IRenameObjectPresenter>(); A.CallTo(() => _applicationController.Start <IRenameObjectPresenter>()).Returns(_renamePresenter); sut = new EntityTask(_applicationController, _executionContext); }
protected override void Context() { _applicationController = A.Fake <IApplicationController>(); _executionContext = A.Fake <IExecutionContext>(); _entity = A.Fake <IEntity>(); _renameObjectFactory = A.Fake <IRenameObjectDTOFactory>(); _renamePresenter = A.Fake <IRenameObjectPresenter>(); A.CallTo(() => _applicationController.Start <IRenameObjectPresenter>()).Returns(_renamePresenter); sut = new EntityTask(_applicationController, _executionContext, _renameObjectFactory); _renameDTO = new RenameObjectDTO(_entity.Name); _renameDTO.AddUsedNames(new[] { "A", "B" }); A.CallTo(() => _renameObjectFactory.CreateFor(_entity)).Returns(_renameDTO); A.CallTo(() => _executionContext.TypeFor <IObjectBase>(_entity)).Returns(ENT_TYPE); }