Ejemplo n.º 1
0
 protected Tag()
 {
     this.presenter = new TagPresenter(this);
 }
Ejemplo n.º 2
0
        public void TagPresenterInitiliazingShouldReturnTwoPosts()
        {
            // Arrange
            List<PostViewModel> posts = new List<PostViewModel>();
            var tagViewMock = new Mock<ITagView>();
            tagViewMock.SetupSet(t => t.Posts = It.IsAny<List<PostViewModel>>())
                .Callback<List<PostViewModel>>((list) => posts = list);

            var fakeTagPresenter = new TagPresenter(tagViewMock.Object, this.mocksContainer.DataMock.Object);

            // Act
            fakeTagPresenter.Initialize("TestTag1");

            // Assert
            Assert.AreEqual(2, posts.Count);
        }