public async Task CreateNewClient() { var newClient = new Client.Models.Client { ClientId = "testClientId", }; var res = await client.Realms().Name("master").Clients().CreateAsync(newClient); res.Success.Should().BeTrue("The creation result should be true"); res.Id.Should().HaveLength(36, "The returned Id should have a length of 36"); }
public async Task UpdateNewClient() { var newClient = await client.Realms().Name("master").Clients().FindAsync(new Client.Models.ClientFilter { ClientId = "testClientId", }); newClient.Should().HaveCount(1, "The user should be easily found"); newClient.First().Id.Should().NotBeNull("Did the new user creation test run successfully???"); var clientID = newClient.First().Id; var updatedClient = new Client.Models.Client { ClientId = newClient.First().ClientId, Name = "testClientNameUpdate", Description = "testDescriptionUpdate", Enabled = true }; var res = await client.Realms().Name("master").Clients().Id(clientID).UpdateAsync(updatedClient); res.Should().BeTrue("The update result should be true"); }