public async Task UploadProviderVersion_CallsCorrectly(
            string providerVersionId)
        {
            IProviderVersionService       providerVersionService       = Substitute.For <IProviderVersionService>();
            IProviderVersionSearchService providerVersionSearchService = Substitute.For <IProviderVersionSearchService>();

            ProviderVersionViewModel providers = new ProviderVersionViewModel();

            ProviderByVersionController controller = new ProviderByVersionController(
                providerVersionService,
                providerVersionSearchService);

            controller.ControllerContext = new Microsoft.AspNetCore.Mvc.ControllerContext()
            {
                RouteData = new Microsoft.AspNetCore.Routing.RouteData
                            (
                    new Microsoft.AspNetCore.Routing.RouteValueDictionary
                    (
                        new Dictionary <string, string>()
                {
                    { "controller", "ProviderByVersion" }
                }
                    )
                            )
            };

            await controller.UploadProviderVersion(providerVersionId, providers);

            await providerVersionService
            .Received(1)
            .UploadProviderVersion("GetProvidersByVersion", "ProviderByVersion", providerVersionId, providers);
        }
        public async Task DoesProviderVersionExist_CallsCorrectly(
            string providerVersionId)
        {
            IProviderVersionService       providerVersionService       = Substitute.For <IProviderVersionService>();
            IProviderVersionSearchService providerVersionSearchService = Substitute.For <IProviderVersionSearchService>();

            ProviderByVersionController controller = new ProviderByVersionController(
                providerVersionService,
                providerVersionSearchService);

            await controller.DoesProviderVersionExist(providerVersionId);

            await providerVersionService
            .Received(1)
            .DoesProviderVersionExist(providerVersionId);
        }
        public async Task GetProvidersByVersion_CallsCorrectly(
            string providerVersionId)
        {
            IProviderVersionService       providerVersionService       = Substitute.For <IProviderVersionService>();
            IProviderVersionSearchService providerVersionSearchService = Substitute.For <IProviderVersionSearchService>();

            ProviderByVersionController controller = new ProviderByVersionController(
                providerVersionService,
                providerVersionSearchService);

            await controller.GetProvidersByVersion(providerVersionId);

            await providerVersionService
            .Received(1)
            .GetAllProviders(providerVersionId);
        }
        public async Task SearchProviderVersions_CallsCorrectly()
        {
            IProviderVersionService       providerVersionService       = Substitute.For <IProviderVersionService>();
            IProviderVersionSearchService providerVersionSearchService = Substitute.For <IProviderVersionSearchService>();

            ProviderByVersionController controller = new ProviderByVersionController(
                providerVersionService,
                providerVersionSearchService);

            SearchModel searchModel = new SearchModel();

            await controller.SearchProviderVersions(searchModel);

            await providerVersionSearchService
            .Received(1)
            .SearchProviderVersions(searchModel);
        }