public void Get_ShouldReturnSuccess()
        {
            var testDbPost = TestData.CreateDbSocialMediaPost("http://facebook.com/post/123");

            context.SocialMediaPost.Add(testDbPost);
            context.SaveChanges();

            var result = controller.GetSocialMediaPost(testDbPost.Id) as ObjectResult;

            result.Should().BeOfType <OkObjectResult>();
            result.StatusCode.Should().Be(200);

            var model = result.Value as Models.SocialMediaPost;

            model.Url.Should().Be(testDbPost.Url);
        }
        public void Get_ShouldReturnFail()
        {
            var mockContext = new Mock <HubDbContext>(options);

            mockContext.Setup(m => m.SocialMediaPost).Throws(new Exception());
            var controller = new SocialMediaPostsController(mockContext.Object, logger.Object, mapper);

            var testDbPost = TestData.CreateDbSocialMediaPost("http://facebook.com/post/123");

            context.SocialMediaPost.Add(testDbPost);
            context.SaveChanges();

            var result = controller.GetSocialMediaPost(testDbPost.Id) as ObjectResult;

            result.Should().BeOfType <BadRequestObjectResult>();
            result.StatusCode.Should().Be(400);
        }