public async void GivenTheDataStore_WhenGettingIAlldentityProviders_ThenAllIdentityProvidersReturned() { var idpDict = new Dictionary <string, IdentityProvider>(); idpDict.Add("aad", GetIdentityProvider("aad", "fhir-api", "http://testauthority")); idpDict.Add("test1", GetIdentityProvider("test1", "fhir-api-1", "http://testauthority1")); idpDict.Add("test2", GetIdentityProvider("test2", "fhir-api-2", "http://testauthority2")); _controlPlaneDataStore.GetAllIdentityProvidersAsync(Arg.Any <CancellationToken>()).Returns(idpDict.Values); var identityProviders = await _rbacService.GetAllIdentityProvidersAsync(CancellationToken.None); Assert.Equal(3, identityProviders.Count()); VerifyIdentityProvider("aad", "fhir-api", "http://testauthority", "1.0", idpDict["aad"]); VerifyIdentityProvider("test1", "fhir-api-1", "http://testauthority1", "1.0", idpDict["test1"]); VerifyIdentityProvider("test2", "fhir-api-2", "http://testauthority2", "1.0", idpDict["test2"]); }
public async Task <IEnumerable <IdentityProvider> > GetAllIdentityProvidersAsync(CancellationToken cancellationToken) { return(await _controlPlaneDataStore.GetAllIdentityProvidersAsync(cancellationToken)); }