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); }
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()); }