Esempio n. 1
0
        public void SelectedItemModified_Test()
        {
            // arrange
            var fakeBookRepo              = A.Fake <IBookService>();
            var fakeMediaItemService      = A.Fake <IMediaItemService>();
            var fakeTagService            = A.Fake <ITagService>();
            var fakeAuthorService         = A.Fake <IAuthorService>();
            var fakePublisherService      = A.Fake <IPublisherService>();
            var fakeView                  = A.Fake <IMainWindow>();
            MainWindowPresenter presenter = new MainWindowPresenter(fakeBookRepo, fakeMediaItemService, fakeTagService, fakeAuthorService, fakePublisherService, fakeView);

            // act
            presenter.SelectedItemModified(null, null);

            // assert
            Assert.IsTrue(fakeView.UpdateSelectedItemButtonEnabled);
            Assert.IsTrue(fakeView.DiscardSelectedItemChangesButtonEnabled);
        }