コード例 #1
0
        public async Task NoAuthentication(WebhookConfig config)
        {
            var factory = new AuthenticationHandlerFactory(new HttpClientFactory(), new Mock <IBigBrother>().Object);

            var handler = await factory.GetAsync(config, CancellationToken.None);

            Assert.Null(handler);
        }
コード例 #2
0
        public async Task GetTokenProvider(WebhookConfig config, IAuthenticationHandler expectedHandler)
        {
            var factory = new AuthenticationHandlerFactory(new HttpClientFactory(), new Mock <IBigBrother>().Object);

            var handler = await factory.GetAsync(config, CancellationToken.None);

            Assert.Equal(expectedHandler.GetType(), handler.GetType());
        }