public void UserFieldDefinition_AllowMultipleValues_ShouldUpdate_FieldType() { var def = new UserFieldDefinition(); def.AllowMultipleValues = false; Assert.IsTrue(def.FieldType == BuiltInFieldTypes.User); def.AllowMultipleValues = true; Assert.IsTrue(def.FieldType == BuiltInFieldTypes.UserMulti); }
protected override FieldDefinition GetFieldDefinitionTemplate() { var def = new UserFieldDefinition(); if (Rnd.Bool()) def.SelectionMode = BuiltInFieldUserSelectionMode.PeopleAndGroups; else def.SelectionMode = BuiltInFieldUserSelectionMode.PeopleOnly; def.Presence = Rnd.Bool(); def.AllowDisplay = Rnd.Bool(); return def; }
public static ModelNode AddUserField(this ModelNode model, UserFieldDefinition definition, Action<ModelNode> action) { return model.AddDefinitionNode(definition, action); }
public static ModelNode AddUserField(this ModelNode model, UserFieldDefinition definition) { return AddUserField(model, definition, null); }