public async Task <IActionResult> GetCurrentProvidersForFundingStream(string fundingStreamId)
        {
            Guard.IsNullOrWhiteSpace(fundingStreamId, nameof(fundingStreamId));

            CurrentProviderVersion currentProviderVersion = await GetCurrentProviderVersion(fundingStreamId);

            if (currentProviderVersion == null)
            {
                LogError("Unable to get all current providers for funding stream. " +
                         $"No current provider version information located for {fundingStreamId}");

                return(new NotFoundResult());
            }

            return(await _providerVersionService.GetAllProviders(currentProviderVersion.ProviderVersionId));
        }
        public async Task SetProviderDateProviderVersion_CallsCorrectly(int year, int month, int day)
        {
            IProviderVersionService       providerVersionService       = Substitute.For <IProviderVersionService>();
            IProviderVersionSearchService providerVersionSearchService = Substitute.For <IProviderVersionSearchService>();

            providerVersionService
            .GetAllProviders(Arg.Any <string>())
            .Returns(new OkObjectResult(new Provider {
                ProviderVersionId = "providerVersionId"
            }));

            ProviderByDateController controller = Substitute.For <ProviderByDateController>(providerVersionService, providerVersionSearchService);


            await controller.SetProviderDateProviderVersion(year, month, day, "providerVersionId");

            await providerVersionService
            .Received(1)
            .SetProviderVersionByDate(Arg.Any <int>(), Arg.Any <int>(), Arg.Any <int>(), Arg.Any <string>());
        }
 public async Task <IActionResult> GetProvidersByVersion([FromRoute] int year, [FromRoute] int month, [FromRoute] int day)
 {
     return(await _providerVersionService.GetAllProviders(year, month, day));
 }
 public async Task <IActionResult> GetProvidersByVersion([FromRoute] string providerVersionId)
 {
     return(await _providerVersionService.GetAllProviders(providerVersionId));
 }