protected override void Context()
 {
     _worskpace = A.Fake <ICoreWorkspace>();
     _labelTask = A.Fake <ILabelTask>();
     sut        = new AddLabelCommand(_labelTask, _worskpace);
     A.CallTo(() => _worskpace.HistoryManager).Returns(A.Fake <IHistoryManager <PKSimProject> >());
 }
 public HistoryBrowserPresenter(IHistoryBrowserView view, ILabelTask labelTask, ICommentTask commentTask,
                                IHistoryToHistoryDTOMapper mapper, IHistoryItemDTOEnumerableToHistoryItemDTOList historyItemDTOListMapper)
 {
     View         = view;
     _labelTask   = labelTask;
     _commentTask = commentTask;
     _mapper      = mapper;
     _historyItemDTOListMapper = historyItemDTOListMapper;
     EnableFiltering           = true;
     EnableAutoFilterRow       = true;
     EnableHistoryPruning      = true;
     _historyItemDtoList       = historyItemDTOListMapper.MapFrom(Enumerable.Empty <IHistoryItemDTO>());
 }
 protected override void Context()
 {
     _view                     = A.Fake <IHistoryBrowserView>();
     _historyList              = new List <IHistoryItem>();
     _historyManager           = A.Fake <IHistoryManager>();
     _historyBrowserProperties = A.Fake <IHistoryBrowserProperties>();
     _labelTask                = A.Fake <ILabelTask>();
     _mapper                   = A.Fake <IHistoryToHistoryDTOMapper>();
     _commentTask              = A.Fake <ICommentTask>();
     _historyItemDTOListMapper = A.Fake <IHistoryItemDTOEnumerableToHistoryItemDTOList>();
     _historyItemDTOList       = A.Fake <IHistoryItemDTOList>();
     A.CallTo(_historyItemDTOListMapper).WithReturnType <IHistoryItemDTOList>().Returns(_historyItemDTOList);
     _historyBrowserConfiguration = new HistoryBrowserConfiguration();
     A.CallTo(() => _historyManager.History).Returns(_historyList);
     sut = new HistoryBrowserPresenter(_view, _labelTask, _commentTask, _mapper, _historyItemDTOListMapper);
     sut.Initialize();
     sut.HistoryManager = _historyManager;
 }
Exemple #4
0
 public AddLabelCommand(ILabelTask labelTask, IWorkspace workspace)
 {
     _labelTask = labelTask;
     _workspace = workspace;
 }
 public AddLabelCommand(ILabelTask labelTask, IMoBiContext context)
 {
     _labelTask = labelTask;
     _context   = context;
 }