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 client = await _validator.ValidateClientCredentialsAsync(credential);

            Assert.IsNull(client);
        }
        public async Task Unkown_Client()
        {
            var credential = new ClientCredential
            {
                ClientId = "unknown",
                Secret = "invalid"
            };

            var client = await _validator.ValidateClientCredentialsAsync(credential);

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

            var client = await _validator.ValidateClientCredentialsAsync(credential);

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

            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);
        }
 public async Task Null_ClientId()
 {
     var credential = new ClientCredential();
     
     var client = await _validator.ValidateClientCredentialsAsync(credential);
 }
        public async Task Empty_Client_Credentials()
        {
            var credential = new ClientCredential
            {
                ClientId = "",
                Secret = ""
            };

            var client = await _validator.ValidateClientCredentialsAsync(credential);

            Assert.IsNull(client);
        }