Ejemplo n.º 1
0
        protected override void Context()
        {
            _view             = A.Fake <IJournalPageEditorView>();
            _contentLoader    = A.Fake <IContentLoader>();
            _eventPublisher   = A.Fake <IEventPublisher>();
            _journalTask      = A.Fake <IJournalTask>();
            _mapper           = A.Fake <IJournalPageToJournalPageDTOMapper>();
            _journalSearch    = new JournalSearch();
            _userSettings     = A.Fake <IPresentationUserSettings>();
            _journalRetriever = A.Fake <IJournalRetriever>();
            sut = new JournalPageEditorPresenter(_view, _contentLoader, _mapper, _journalTask, _journalRetriever, _userSettings);

            _journalPage    = new JournalPage();
            _journalPageDTO = new JournalPageDTO(_journalPage);

            _journal = new Journal();
            _journal.AddJournalPage(_journalPage);
            A.CallTo(() => _journalRetriever.Current).Returns(_journal);
            A.CallTo(_mapper).WithReturnType <JournalPageDTO>().Returns(_journalPageDTO);
        }
Ejemplo n.º 2
0
 public IJournalPageEditorFormView AttachWorkingJournalItemEditorView(IJournalPageEditorView view)
 {
     panelControl.FillWith(view);
     view.CaptionChanged += (o, e) => viewCaptionChanged(view);
     return(this);
 }