private static async Task UpdateCustomProperty(IApprendaTestSession session, int id) { var individClient = await session.GetClient(ApiPortals.SOC); var got = await individClient.GetCustomProperty(id); var updatable = new CustomPropertyUpdate(got); updatable.ValueOptions.DefaultValues.Remove("three"); updatable.ValueOptions.PossibleValues.Remove("three"); updatable.ValueOptions.PossibleValues.Add("five"); updatable.DeletedValueReplacements = new Dictionary <string, string> { { "three", "five" } }; updatable.Applicability.Applications = null; updatable.DeveloperOptions = null; var putresult = await individClient.UpdateCustomProperty(updatable); Assert.True(putresult); var cprop = await individClient.GetCustomProperty(id); Assert.Null(cprop.Applicability.Applications); Assert.False(cprop.DeveloperOptions.IsVisible); Assert.False(cprop.DeveloperOptions.VisibilityOptions.IsEditableByDeveloper); Assert.False(cprop.DeveloperOptions.VisibilityOptions.IsRequiredForDeployment); Assert.Contains("five", cprop.ValueOptions.PossibleValues); Assert.False(cprop.ValueOptions.DefaultValues.Contains("three")); Assert.False(cprop.ValueOptions.PossibleValues.Contains("three")); }
public Task <bool> UpdateCustomProperty(CustomPropertyUpdate customPropertyUpdate) { return(PutVoid($"customproperties/{customPropertyUpdate.Id}", customPropertyUpdate, SOC)); }