public HistoryBrowserPresenter(IHistoryBrowserView view, ILabelTask labelTask, ICommentTask commentTask,
                                IHistoryToHistoryDTOMapper mapper, IHistoryItemDTOEnumerableToHistoryItemDTOList historyItemDTOListMapper, IHistoryTask historyTask)
 {
     View         = view;
     _labelTask   = labelTask;
     _commentTask = commentTask;
     _mapper      = mapper;
     _historyItemDTOListMapper = historyItemDTOListMapper;
     _historyTask         = historyTask;
     EnableFiltering      = true;
     EnableAutoFilterRow  = true;
     EnableHistoryPruning = true;
     _historyItemDtoList  = historyItemDTOListMapper.MapFrom(Enumerable.Empty <IHistoryItemDTO>());
 }
示例#2
0
 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>();
     _historyTask              = A.Fake <IHistoryTask>();
     _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, _historyTask);
     sut.Initialize();
     sut.HistoryManager = _historyManager;
 }
 public ClearHistoryUICommand(IHistoryTask historyTask)
 {
     _historyTask = historyTask;
 }
示例#4
0
 protected override void Context()
 {
     _historyTask = A.Fake <IHistoryTask>();
     sut          = new ClearHistoryUICommand(_historyTask);
 }