예제 #1
0
        public void ShowInformsViewToShow()
        {
            var view      = new MockNewsReaderView();
            var presenter = new NewsReaderPresenter(view);

            presenter.Show();

            Assert.IsTrue(view.ShowViewWasCalled);
        }
예제 #2
0
        public void ShowInformsViewToShow()
        {
            var view = new MockNewsReaderView();
            var presenter = new NewsReaderPresenter(view);

            presenter.Show();

            Assert.IsTrue(view.ShowViewWasCalled);

        }
예제 #3
0
        public void SetNewsArticlesSetsViewModel()
        {
            var view = new MockNewsReaderView();
            var presenter = new NewsReaderPresenter(view);

            NewsArticle article = new NewsArticle() { Title = "My Title", Body = "My Body" };
            presenter.SetNewsArticle(article);

            Assert.AreSame(article,view.Model);

        }
예제 #4
0
        public void SetNewsArticlesSetsViewModel()
        {
            var view      = new MockNewsReaderView();
            var presenter = new NewsReaderPresenter(view);

            NewsArticle article = new NewsArticle()
            {
                Title = "My Title", Body = "My Body"
            };

            presenter.SetNewsArticle(article);

            Assert.AreSame(article, view.Model);
        }