public void AuthenticationServiceReturnsTrueIfKeyMatchesConfigurationKey(string key) { var apiKeyAuthService = new ApiKeyPackageAuthenticationService(true, "test-key"); // Act var result = apiKeyAuthService.IsAuthenticatedInternal(key); // Assert Assert.True(result); }
public void AuthenticationServiceReturnsTrueIfRequireApiKeyValueIsSetToFalse(string key, string apiKey) { var apiKeyAuthService = new ApiKeyPackageAuthenticationService(false, apiKey); // Act var result = apiKeyAuthService.IsAuthenticatedInternal(key); // Assert Assert.True(result); }