public void AddEntityFramework_KeyTypeDefaultsToString(Type type)
        {
            // Arrange
            var services = new ServiceCollection();

            var builder = new OpenIddictBuilder(services)
            {
                ApplicationType   = typeof(OpenIddictApplication),
                AuthorizationType = typeof(OpenIddictAuthorization),
                ScopeType         = typeof(OpenIddictScope),
                TokenType         = typeof(OpenIddictToken)
            };

            // Act
            builder.AddEntityFramework <OpenIddictDbContext>();

            // Assert
            Assert.Contains(services, service => service.ImplementationType == type);
        }
        public void AddEntityFramework_RegistersEntityFrameworkStores(Type type)
        {
            // Arrange
            var services = new ServiceCollection();

            var builder = new OpenIddictBuilder(services)
            {
                ApplicationType   = typeof(OpenIddictApplication <Guid>),
                AuthorizationType = typeof(OpenIddictAuthorization <Guid>),
                ScopeType         = typeof(OpenIddictScope <Guid>),
                TokenType         = typeof(OpenIddictToken <Guid>)
            };

            // Act
            builder.AddEntityFramework <OpenIddictDbContext, Guid>();

            // Assert
            Assert.Contains(services, service => service.ImplementationType == type);
        }