Ejemplo n.º 1
0
 protected override void Context()
 {
     base.Context();
     _relatedItem  = new RelatedItem();
     _relatedItem2 = new RelatedItem();
     _journalPage.AddRelatedItem(_relatedItem);
     _journalPage.AddRelatedItem(_relatedItem2);
     _journal = new Journal.Journal();
     _journal.AddJournalPage(_journalPage);
     A.CallTo(() => _dialogCreator.MessageBoxYesNo(Captions.Journal.ReallyDeleteMultipleRelatedItems)).Returns(ViewResult.Yes);
 }
Ejemplo n.º 2
0
        protected override void Context()
        {
            _eventPublisher     = A.Fake <IEventPublisher>();
            _databaseMediator   = A.Fake <IDatabaseMediator>();
            _dialogCreator      = A.Fake <IDialogCreator>();
            _journalRetriever   = A.Fake <IJournalRetriever>();
            _relatedItemFactory = A.Fake <IRelatedItemFactory>();
            _journal            = new Journal.Journal();

            A.CallTo(() => _journalRetriever.Current).Returns(_journal);

            sut = new JournalPageTask(_databaseMediator, _eventPublisher, _dialogCreator, _relatedItemFactory);

            _journalPage = new JournalPage();
            _journal.AddJournalPage(_journalPage);
        }