Exemplo n.º 1
0
        public void Details_with_article_id_should_return_article()
        {
            var article = new Article();

            //given
            _repository.Setup(x => x.Get(It.IsAny <Guid>()))
            .Returns(article);

            //when
            var result = _controller.Details(Guid.NewGuid()) as ViewResult;

            //then
            result.ViewData.Model.Should().BeSameAs(article);
        }