public void EditReturnsMappedViewModelIfIdExists()
        {
            // Arrange
            var controller = new PublishArticlesController(mockRepository.Object, mockMapper.Object);
            var id         = 2;

            // Act
            var result    = controller.Edit(id) as ViewResult;
            var viewModel = result.ViewData.Model as ArticleViewModel;

            // Assert
            Assert.AreEqual(id, viewModel.Id);
        }
        public void EditReturnsEmptyViewModelIfIdIsZero()
        {
            // Arrange
            var controller = new PublishArticlesController(mockRepository.Object, mockMapper.Object);
            var id         = 0;

            // Act
            var result    = controller.Edit(id) as ViewResult;
            var viewModel = result.ViewData.Model as ArticleViewModel;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(default(int), viewModel.Id);
        }