public void GivenValidData_WhenICreateAPost_ThenThePostIsCreated()
        {
            var dashboardService = new DashboardService(postRepository.Object, blogRepository.Object);

            dashboardService.Update(1, "title", "entry", 1);
            blogRepository.Verify(b => b.UpdateBlogStatistics(1), Times.Once());
            postRepository.Verify(p => p.Update(1, "title", "entry"));
        }
        public void GivenValidData_AndAnUnavailableDatabase_WhenICreateAPost_ThenAnMBlogExceptionIsThhrown()
        {
            postRepository.Setup(p => p.Update(It.IsAny<int>(), It.IsAny<string>(), It.IsAny<string>())).Throws
                <Exception>();
            var dashboardService = new DashboardService(postRepository.Object, blogRepository.Object);

            Assert.Throws<MBlogException>(
                () => dashboardService.Update(It.IsAny<int>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>()));
        }