/* * Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) * See https://github.com/openiddict/openiddict-core for more information concerning * the license and the contributors participating to this project. */ using System; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Xunit; namespace OpenIddict.EntityFrameworkCore.Tests { public class OpenIddictExtensionsTests { [Theory] [InlineData(typeof(OpenIddictApplicationStoreResolver))] [InlineData(typeof(OpenIddictAuthorizationStoreResolver))] [InlineData(typeof(OpenIddictScopeStoreResolver))] [InlineData(typeof(OpenIddictTokenStoreResolver))] public void AddEntityFrameworkCoreStores_RegistersEntityFrameworkCoreStoreFactories(Type type) { // Arrange var services = new ServiceCollection(); var builder = services.AddOpenIddict().AddCore(); // Act builder.AddEntityFrameworkCoreStores(); // Assert Assert.Contains(services, service => service.ImplementationType == type); } } }