CreateContext(
            string userInfoEndpoint = "https://user-info-endpoint",
            string scope            = "")
        {
            var configurationManager =
                A.Fake <IConfigurationManager <OpenIdConnectConfiguration> >();

            A.CallTo(() => configurationManager.GetConfigurationAsync(A <CancellationToken> ._))
            .Returns(new OpenIdConnectConfiguration
            {
                UserInfoEndpoint = "https://user-info-endpoint",
            });
            var options =
                new VippsOpenIdConnectAuthenticationOptions("clientId", "clientSecret", "authority")
            {
                ConfigurationManager = configurationManager,
                Scope = scope
            };
            var context =
                new SecurityTokenValidatedNotification <OpenIdConnectMessage, OpenIdConnectAuthenticationOptions>(
                    A.Fake <IOwinContext>(), options)
            {
                AuthenticationTicket = new AuthenticationTicket(new ClaimsIdentity(), new AuthenticationProperties(
                                                                    new Dictionary <string, string>()
                {
                    { ".redirect", "https://test.url/redirect-url" }
                })),
                ProtocolMessage = A.Fake <OpenIdConnectMessage>()
            };

            return(context);
        }
        public void VippsOpenIdConnectAuthenticationOptionsDoesNotThrow(string clientId, string clientSecret, string authority)
        {
            var options = new VippsOpenIdConnectAuthenticationOptions(clientId, clientSecret, authority);

            Assert.Equal(clientId, options.ClientId);
            Assert.Equal(clientSecret, options.ClientSecret);
            Assert.Equal(authority, options.Authority);
        }