public void Create_ReturnTheCorrectModelType() { var fakePostRepository = new Mock<IPostRepository>(); var fakeViewMapper = new Mock<IViewMapper>(); var sut = new AdminController(fakePostRepository.Object, fakeViewMapper.Object); var model = sut.Create().Model as BlogPostViewModel; Assert.IsInstanceOf(typeof(BlogPostViewModel), model); }
public void Create_ReturnTheCorrectView() { var fakePostRepository = new Mock<IPostRepository>(); var fakeViewMapper = new Mock<IViewMapper>(); var sut = new AdminController(fakePostRepository.Object, fakeViewMapper.Object); string expected = string.Empty; string actual = sut.Create().ViewName; Assert.AreEqual(expected, actual); }