public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop) { object newValue = null; var values = new List <string>(); values.Add(BuiltInBasePermissions.AddAndCustomizePages); values.Add(BuiltInBasePermissions.AnonymousSearchAccessWebLists); values.Add(BuiltInBasePermissions.ApproveItems); values.Add(BuiltInBasePermissions.CancelCheckout); values.Add(BuiltInBasePermissions.CreateSSCSite); values.Add(BuiltInBasePermissions.EditMyUserInfo); if (prop.PropertyType == typeof(string)) { newValue = RndService.RandomFromArray(values); } if (prop.PropertyType == typeof(Collection <string>)) { newValue = RndService.RandomCollectionFromArray(values); } return(newValue); }
public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop) { object newValue = null; var values = new List <string>(); values.Add(BuiltInPublishingPageLayoutNames.ArticleLeft); values.Add(BuiltInPublishingPageLayoutNames.ArticleLinks); values.Add(BuiltInPublishingPageLayoutNames.ArticleRight); values.Add(BuiltInPublishingPageLayoutNames.BlankWebPartPage); values.Add(BuiltInPublishingPageLayoutNames.CatalogArticle); values.Add(BuiltInPublishingPageLayoutNames.CatalogWelcome); values.Add(BuiltInPublishingPageLayoutNames.EnterpriseWiki); if (prop.PropertyType == typeof(string)) { newValue = RndService.RandomFromArray(values); } if (prop.PropertyType == typeof(Collection <string>)) { newValue = RndService.RandomCollectionFromArray(values); } return(newValue); }
public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop) { object newValue = null; var values = new List <string>(); values.Add("4"); values.Add("15"); if (prop.PropertyType == typeof(string)) { newValue = RndService.RandomFromArray(values); } if (prop.PropertyType == typeof(Collection <string>)) { newValue = RndService.RandomCollectionFromArray(values);; } if (prop.PropertyType == typeof(List <string>)) { newValue = RndService.RandomListFromArray(values); } return(newValue); }
public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop) { object newValue = null; var values = new List <string>(); values.Add(BuiltInInternalFieldNames.ID); values.Add(BuiltInInternalFieldNames.Edit); values.Add(BuiltInInternalFieldNames.Created); values.Add(BuiltInInternalFieldNames._Author); if (prop.PropertyType == typeof(string)) { newValue = values[RndService.Int(values.Count - 1)]; } if (prop.PropertyType == typeof(Collection <string>)) { newValue = RndService.RandomCollectionFromArray(values); } return(newValue); }
public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop) { object newValue = null; var values = new List <string>(); values.Add(BuiltInPublishingContentTypeId.ArticlePage); values.Add(BuiltInPublishingContentTypeId.EnterpriseWikiPage); values.Add(BuiltInPublishingContentTypeId.ErrorPage); values.Add(BuiltInPublishingContentTypeId.RedirectPage); if (prop.PropertyType == typeof(string)) { newValue = RndService.RandomFromArray(values); } if (prop.PropertyType == typeof(Collection <string>)) { newValue = RndService.RandomCollectionFromArray(values); } return(newValue); }
public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop) { object newValue = null; var values = new List <string>(); values.Add(BuiltInInternalFieldNames.ID); values.Add(BuiltInInternalFieldNames.FileRef); values.Add(BuiltInInternalFieldNames.FileType); values.Add(BuiltInInternalFieldNames.File_x0020_Size); values.Add(BuiltInInternalFieldNames.FirstName); if (prop.PropertyType == typeof(string)) { newValue = RndService.RandomFromArray(values); } if (prop.PropertyType == typeof(Collection <string>)) { newValue = RndService.RandomCollectionFromArray(values); } return(newValue); }