Beispiel #1
0
        public void GetGrantTypes()
        {
            IClientRepository clientRepository = new ClientDapperRepository(_configuration);

            //Try get some existing grant
            var randomClientGrantType = ClientMock.GenerateRandomClientGrantType();

            var grantTypes = clientRepository.GetGrantTypes(randomClientGrantType.GrantType);

            grantTypes[0].Should().Be(randomClientGrantType.GrantType);
        }
        public void GetGrantTypes()
        {
            using (var context = new IdentityServerConfigurationDbContext(_dbContextOptions, _storeOptions))
            {
                var clientRepository = GetClientRepository(context);

                //Try get some existing grant
                var randomClientGrantType = ClientMock.GenerateRandomClientGrantType();

                var grantTypes = clientRepository.GetGrantTypes(randomClientGrantType.GrantType);
                grantTypes[0].Should().Be(randomClientGrantType.GrantType);
            }
        }
        public void GetGrantTypes()
        {
            using (var context = new AdminDbContext(_dbContextOptions, _storeOptions, _operationalStore))
            {
                IClientRepository clientRepository = new ClientRepository(context);

                //Try get some existing grant
                var randomClientGrantType = ClientMock.GenerateRandomClientGrantType();

                var grantTypes = clientRepository.GetGrantTypes(randomClientGrantType.GrantType);
                grantTypes[0].Should().Be(randomClientGrantType.GrantType);
            }
        }