public async Task SegmentControllerDocumentHtmlReturnsNoContentWhenNoData(string mediaTypeName)
        {
            // Arrange
            var controller = BuildSegmentController(mediaTypeName);

            A.CallTo(() => FakeRelatedCareersSegmentService.GetByNameAsync(A <string> .Ignored)).Returns((RelatedCareersSegmentModel)null);

            // Act
            var result = await controller.Document(Article).ConfigureAwait(false);

            // Assert
            A.CallTo(() => FakeRelatedCareersSegmentService.GetByNameAsync(A <string> .Ignored)).MustHaveHappenedOnceExactly();
            var statusResult = Assert.IsType <NoContentResult>(result);

            Assert.Equal((int)HttpStatusCode.NoContent, statusResult.StatusCode);

            controller.Dispose();
        }
        public async Task SegmentControllerDocumentHtmlReturnsSuccess(string mediaTypeName)
        {
            // Arrange
            var expectedResult = A.Fake <RelatedCareersSegmentModel>();
            var controller     = BuildSegmentController(mediaTypeName);

            A.CallTo(() => FakeRelatedCareersSegmentService.GetByNameAsync(A <string> .Ignored)).Returns(expectedResult);
            A.CallTo(() => FakeMapper.Map <DocumentViewModel>(A <RelatedCareersSegmentModel> .Ignored)).Returns(A.Fake <DocumentViewModel>());

            // Act
            var result = await controller.Document(Article).ConfigureAwait(false);

            // Assert
            A.CallTo(() => FakeRelatedCareersSegmentService.GetByNameAsync(A <string> .Ignored)).MustHaveHappenedOnceExactly();
            A.CallTo(() => FakeMapper.Map <DocumentViewModel>(A <RelatedCareersSegmentModel> .Ignored)).MustHaveHappenedOnceExactly();

            var viewResult = Assert.IsType <ViewResult>(result);

            Assert.IsAssignableFrom <DocumentViewModel>(viewResult.ViewData.Model);

            controller.Dispose();
        }