public async Task CreateNewRealm() { var newRealm = new Realm.Models.Realm { DisplayName = "test Display name", Name = "testRealm", Enabled = true }; var res = await client.Realms().CreateAsync(newRealm); res.Success.Should().BeTrue("The creation result should be true"); res.Id.Should().BeEquivalentTo("testRealm".ToString(), "The returned Id shoulb be the same as the sent one"); }
public async Task UpdateNewRealm() { var newRealm = new Realm.Models.Realm { DisplayName = "test Display name update", Enabled = false }; var res = await client.Realms().Name("testRealm").UpdateAsync(newRealm); res.Should().BeTrue("The update result should be true"); var res2 = await client.Realms().Name("testRealm").GetAsync(); res2.Enabled.Should().BeFalse("The realm should be disabled"); res2.Name.Should().BeEquivalentTo("testRealm", "The default realm name should be equal to 'testRealm'"); res2.DisplayName.Should().BeEquivalentTo("test Display name update", "The default realm DisplayName should be equal to 'test Display name update'"); }