public async Task Null_ClientId()
 {
     var credential = new ClientCredential();
     
     var validator = new ClientValidator(_settings, _logger);
     var client = await validator.ValidateClientCredentialsAsync(credential);
 }
        public async Task Disabled_Client()
        {
            var credential = new ClientCredential
            {
                ClientId = "disabled",
                Secret = "invalid"
            };

            var validator = new ClientValidator(_settings, _logger);
            var client = await validator.ValidateClientCredentialsAsync(credential);

            Assert.IsNull(client);
        }
        public async Task Valid_Client_Credentials()
        {
            var credential = new ClientCredential
            {
                ClientId = "codeclient",
                Secret = "secret"
            };

            var validator = new ClientValidator(_settings, _logger);
            var client = await validator.ValidateClientCredentialsAsync(credential);

            Assert.IsNotNull(client);
            Assert.AreEqual("codeclient", client.ClientId);
        }
        public async Task Empty_Client_Credentials()
        {
            var credential = new ClientCredential
            {
                ClientId = "",
                Secret = ""
            };

            var validator = new ClientValidator(_settings, _logger);
            var client = await validator.ValidateClientCredentialsAsync(credential);

            Assert.IsNull(client);
        }