public void GetTelevisionShowsByQuery_When_TheMovieDbDispatcherThrowsException_Throws_Exception()
        {
            _entertainmentDispatcherMock.Setup(x => x.GetTelevisionShowsByQuery(It.IsAny <string>())).Throws <Exception>();
            var televisionService = new CodeSample.Services.TelevisionService(_entertainmentDispatcherMock.Object);

            Assert.Catch <Exception>(() => televisionService.GetTelevisionShowsByQuery(null));
        }
        public void GetTelevisionShowsByQuery_When_Successful_Returns_TelevisionSearchResponseDTO()
        {
            var expectedResult = Builder <TelevisionSearchResponseDto> .CreateNew().Build();

            _entertainmentDispatcherMock.Setup(x => x.GetTelevisionShowsByQuery(It.IsAny <string>())).Returns(expectedResult);
            var televisionService = new CodeSample.Services.TelevisionService(_entertainmentDispatcherMock.Object);
            var actualResult      = televisionService.GetTelevisionShowsByQuery(null);

            actualResult.ToExpectedObject().ShouldEqual(expectedResult);
        }
        public void GetTelevisionShowsByQuery_When_TheMovieDbDispatcherThrowsStrategyCorpsException_Throws_StrategyCorpsException()
        {
            var expectedException = Builder <StrategyCorpsException> .CreateNew()
                                    .With(x => x.StrategyCorpsErrorCode = ErrorCode.Default).Build();

            _entertainmentDispatcherMock.Setup(x => x.GetTelevisionShowsByQuery(It.IsAny <string>())).Throws(expectedException);
            var televisionService = new CodeSample.Services.TelevisionService(_entertainmentDispatcherMock.Object);

            var actualException = Assert.Catch <Exception>(() => televisionService.GetTelevisionShowsByQuery(null));

            actualException.ToExpectedObject().ShouldEqual(expectedException);
        }