예제 #1
0
 public RenameObjectPresenter(IObjectBaseView view, IObjectTypeResolver objectTypeResolver, IRenameObjectDTOFactory renameObjectDTOFactory)
     : base(view, descriptionVisible: false)
 {
     _objectTypeResolver     = objectTypeResolver;
     _renameObjectDTOFactory = renameObjectDTOFactory;
     _forbiddenNames         = new List <string>();
 }
 public EntityTask(
     IApplicationController applicationController,
     IExecutionContext executionContext,
     IRenameObjectDTOFactory renameObjectDTOFactory)
 {
     _applicationController  = applicationController;
     _executionContext       = executionContext;
     _renameObjectDTOFactory = renameObjectDTOFactory;
 }
예제 #3
0
 protected override void Context()
 {
     _cloneManager           = A.Fake <ICloneManagerForModel>();
     _renameObjectDTOFactory = A.Fake <IRenameObjectDTOFactory>();
     _objectTypeResolver     = A.Fake <IObjectTypeResolver>();
     _view = A.Fake <IObjectBaseView>();
     _parameterIdentification = A.Fake <ParameterIdentification>();
     _executionContext        = A.Fake <IOSPSuiteExecutionContext>();
     sut = new CloneObjectBasePresenter <ParameterIdentification>(_view, _objectTypeResolver, _renameObjectDTOFactory, _cloneManager, _executionContext);
 }
예제 #4
0
 protected AbstractClonePresenter(
     IObjectBaseView view,
     IObjectTypeResolver objectTypeResolver,
     IRenameObjectDTOFactory renameObjectDTOFactory,
     IOSPSuiteExecutionContext executionContext) : base(view)
 {
     _objectTypeResolver         = objectTypeResolver;
     _renameObjectBaseDTOFactory = renameObjectDTOFactory;
     _executionContext           = executionContext;
 }
 public CloneObjectBasePresenter(
     IObjectBaseView view,
     IObjectTypeResolver objectTypeResolver,
     IRenameObjectDTOFactory renameObjectDTOFactory,
     ICloneManagerForModel cloneManager,
     IOSPSuiteExecutionContext executionContext) :
     base(view, objectTypeResolver, renameObjectDTOFactory, executionContext)
 {
     _cloneManager = cloneManager;
 }
 public CloneBuildingBlockPresenter(
     IObjectBaseView view,
     IObjectTypeResolver objectTypeResolver,
     IRenameObjectDTOFactory renameObjectBaseDTOFactory,
     ICloner cloner,
     IOSPSuiteExecutionContext executionContext)
     : base(view, objectTypeResolver, renameObjectBaseDTOFactory, executionContext)
 {
     _cloner = cloner;
 }
 protected override void Context()
 {
     _view                   = A.Fake <IObjectBaseView>();
     _objectToRename         = A.Fake <IWithName>();
     _renameObjectDTOFactory = A.Fake <IRenameObjectDTOFactory>();
     _entityType             = "type";
     _entityName             = "tutu";
     _objectToRename.Name    = _entityName;
     _renameObjectDTO        = new RenameObjectDTO(_entityName);
     _objectTypeResolver     = A.Fake <IObjectTypeResolver>();
     A.CallTo(() => _objectTypeResolver.TypeFor(_objectToRename)).Returns(_entityType);
     A.CallTo(() => _renameObjectDTOFactory.CreateFor(_objectToRename)).Returns(_renameObjectDTO);
     sut = new RenameObjectPresenter(_view, _objectTypeResolver, _renameObjectDTOFactory);
 }
        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);
        }
예제 #9
0
 protected override void Context()
 {
     _entityType         = "tralala";
     _entityName         = "tutu";
     _objectTypeResolver = A.Fake <IObjectTypeResolver>();
     _buildingBlock      = A.Fake <IPKSimBuildingBlock>();
     A.CallTo(() => _buildingBlock.Rules).Returns(A.Fake <IBusinessRuleSet>());
     _buildingBlock.Name = _entityName;
     _view = A.Fake <IObjectBaseView>();
     A.CallTo(() => _objectTypeResolver.TypeFor(_buildingBlock)).Returns(_entityType);
     _buildingBlockDTO = new RenameObjectDTO(_entityName);
     _cloneObject      = A.Fake <IPKSimBuildingBlock>();
     _cloner           = A.Fake <ICloner>();
     A.CallTo(() => _cloner.Clone(_buildingBlock)).Returns(_cloneObject);
     _renameObjectBaseDTOFactory = A.Fake <IRenameObjectDTOFactory>();
     A.CallTo(() => _renameObjectBaseDTOFactory.CreateFor(_buildingBlock)).Returns(_buildingBlockDTO);
     sut = new CloneBuildingBlockPresenter(_view, _objectTypeResolver, _renameObjectBaseDTOFactory, _cloner);
 }
예제 #10
0
 public CloneObjectBasePresenter(IObjectBaseView view, IObjectTypeResolver objectTypeResolver, IRenameObjectDTOFactory renameObjectDTOFactory, ICloneManagerForModel cloneManager) :
     base(view, objectTypeResolver, renameObjectDTOFactory)
 {
     _cloneManager = cloneManager;
 }
예제 #11
0
 protected AbstractClonePresenter(IObjectBaseView view, IObjectTypeResolver objectTypeResolver, IRenameObjectDTOFactory renameObjectDTOFactory) : base(view)
 {
     _objectTypeResolver         = objectTypeResolver;
     _renameObjectBaseDTOFactory = renameObjectDTOFactory;
 }
 public CloneBuildingBlockPresenter(IObjectBaseView view, IObjectTypeResolver objectTypeResolver, IRenameObjectDTOFactory renameObjectBaseDTOFactory, ICloner cloner)
     : base(view, objectTypeResolver, renameObjectBaseDTOFactory)
 {
     _cloner = cloner;
 }
 public RenameClassificationPresenter(IObjectBaseView view, IProjectRetriever projectRetriever, IRenameObjectDTOFactory renameObjectBaseDTOFactory)
     : base(view, projectRetriever)
 {
     _renameObjectBaseDTOFactory = renameObjectBaseDTOFactory;
 }
예제 #14
0
 public RenameTemplatePresenter(IObjectBaseView view, IRenameObjectDTOFactory renameObjectBaseDTOFactory, ITemplateTaskQuery templateTaskQuery) : base(view, templateTaskQuery)
 {
     _renameObjectBaseDTOFactory = renameObjectBaseDTOFactory;
 }