示例#1
0
        public void missing_keyset_should_throw()
        {
            var options = new OidcClientOptions
            {
                ProviderInformation = new ProviderInformation
                {
                    IssuerName        = "issuer",
                    AuthorizeEndpoint = "authorize",
                    TokenEndpoint     = "token",
                    KeySet            = null
                }
            };

            var client = new OidcClient(options);

            Func <Task> act = async() => { await client.EnsureProviderInformationAsync(); };

            act.ShouldThrow <InvalidOperationException>().Where(e => e.Message.Equals("Key set is missing in provider information"));
        }