public static PersonAttribute SetupPersonAttribute(Person person) { var attribute = CheckInTestFactories.CreatePersonAttribute(person); attribute.AttributeType = DataType.Int; attribute.Save(CheckInTestConstants.USER_ID); person.SaveAttributes(CheckInTestConstants.ORG_ID, CheckInTestConstants.USER_ID); return(attribute); }
public static PersonAttribute SetupAbilityLevelAttribute(Person person) { var attribute = CheckInTestFactories.CreatePersonAttribute(person); attribute.AttributeType = DataType.Lookup; var abilityLevels = new LookupType(SystemGuids.ABILITY_LEVEL_LOOKUP_TYPE); var lookup = (from al in abilityLevels.Values.OfType <Lookup>() orderby al.Order ascending select al).Last(); attribute.IntValue = lookup.LookupID; attribute.Save(CheckInTestConstants.USER_ID); person.SaveAttributes(CheckInTestConstants.ORG_ID, CheckInTestConstants.USER_ID); return(attribute); }