public void WhenNoTrainingProviderIsFound(
            long trainingProviderId,
            [Frozen] Mock <IInternalApiClient <TrainingProviderConfiguration> > client)
        {
            var sut = new TrainingProviderService(client.Object);

            sut.Invoking((s) => s.GetTrainingProviderDetails(trainingProviderId)).Should().Throw <HttpRequestContentException>();
        }
        public void WhenAnErrorIsFound(
            long trainingProviderId,
            [Frozen] Mock <IInternalApiClient <TrainingProviderConfiguration> > client)
        {
            ClientReturnsSearchWith(client, null, HttpStatusCode.InternalServerError, "some internal error");
            var sut = new TrainingProviderService(client.Object);

            sut.Invoking((s) => s.GetTrainingProviderDetails(trainingProviderId))
            .Should().Throw <HttpRequestContentException>().WithMessage("some internal error");
        }
        public void WhenNoTrainingProviderIsFound(
            long trainingProviderId,
            [Frozen] Mock <IInternalApiClient <TrainingProviderConfiguration> > client)
        {
            ClientReturnsSearchWith(client, new TrainingProviderResponse[0]);
            var sut = new TrainingProviderService(client.Object);

            sut.Invoking((s) => s.GetTrainingProviderDetails(trainingProviderId))
            .Should().Throw <HttpRequestContentException>()
            .WithMessage($"Training Provider Id {trainingProviderId} not found");
        }
        public void WhenMultipleTrainingProvidersAreFound(
            long trainingProviderId,
            TrainingProviderResponse[] results,
            [Frozen] Mock <IInternalApiClient <TrainingProviderConfiguration> > client)
        {
            ClientReturnsSearchWith(client, results);

            var sut = new TrainingProviderService(client.Object);

            sut.Invoking((s) => s.GetTrainingProviderDetails(trainingProviderId)).Should().Throw <HttpRequestContentException>();
        }