Beispiel #1
0
        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(BuiltInTargetControlType.ContentWebParts);
            values.Add(BuiltInTargetControlType.Custom);
            values.Add(BuiltInTargetControlType.Refinement);
            values.Add(BuiltInTargetControlType.SearchBox);
            values.Add(BuiltInTargetControlType.SearchHoverPanel);
            values.Add(BuiltInTargetControlType.SearchResults);

            if (prop.PropertyType == typeof(string))
            {
                newValue = RndService.RandomFromArray(values);
            }

            if (prop.PropertyType == typeof(List <string>))
            {
                newValue = RndService.RandomArrayFromArray(values).ToList();
            }

            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);
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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.Title);

            newValue = RndService.RandomFromArray(values);

            return(newValue);
        }
Beispiel #6
0
        public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop)
        {
            object newValue = null;

            var values = new List <string>();

            values.Add(BuiltInDeveloperDashboardLevel.Off);
            values.Add(BuiltInDeveloperDashboardLevel.On);
            values.Add(BuiltInDeveloperDashboardLevel.OnDemand);

            newValue = RndService.RandomFromArray(values);

            return(newValue);
        }
        public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop)
        {
            object newValue = null;

            var values = new List <string>();

            values.Add(BuiltInPartChromeState.Minimized);
            values.Add(BuiltInPartChromeState.Normal);

            if (prop.PropertyType == typeof(string))
            {
                newValue = RndService.RandomFromArray(values);
            }

            return(newValue);
        }
        public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop)
        {
            object newValue = null;

            var list = new List <string>(new[]
            {
                BuiltInViewScope.Default,
                BuiltInViewScope.FilesOnly,
                BuiltInViewScope.Recursive,
                BuiltInViewScope.RecursiveAll
            });

            newValue = RndService.RandomFromArray(list);

            return(newValue);
        }
        public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop)
        {
            object newValue = null;

            var values = new List <string>
            {
                "Override",
                "Standalone"
            };

            if (prop.PropertyType == typeof(string))
            {
                newValue = RndService.RandomFromArray(values);
            }

            return(newValue);
        }
        public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop)
        {
            var curentValue = prop.GetValue(obj) as string;

            var values = new List <string>();

            values.Add(BuiltInRichTextMode.Compatible);
            values.Add(BuiltInRichTextMode.FullHtml);
            values.Add(BuiltInRichTextMode.HtmlAsXml);
            //values.Add(BuiltInRichTextMode.ThemeHtml);

            if (!string.IsNullOrEmpty(curentValue))
            {
                values.Remove(curentValue);
            }

            return(RndService.RandomFromArray(values));
        }
        public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop)
        {
            object newValue = null;

            var value  = prop.GetValue(obj) as string;
            var values = new List <string>(new[]
            {
                //BuiltInToolbarType.Freeform,
                BuiltInToolbarType.None,
                BuiltInToolbarType.Standard,
            });

            values.Remove(value);

            newValue = RndService.RandomFromArray(values);

            return(newValue);
        }
Beispiel #12
0
        public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop)
        {
            object newValue = null;

            var values = new List <string>();

            values.Add(BuiltInCalendarType.Gregorian);
            values.Add(BuiltInCalendarType.Korea);
            values.Add(BuiltInCalendarType.Hebrew);
            values.Add(BuiltInCalendarType.GregorianArabic);
            values.Add(BuiltInCalendarType.SakaEra);

            if (prop.PropertyType == typeof(string))
            {
                newValue = RndService.RandomFromArray(values);
            }

            return(newValue);
        }
        public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop)
        {
            object newValue = null;

            var values = new List <string>();

            values.Add(BuiltInPartChromeType.BorderOnly);
            values.Add(BuiltInPartChromeType.Default);
            values.Add(BuiltInPartChromeType.None);
            values.Add(BuiltInPartChromeType.TitleAndBorder);
            values.Add(BuiltInPartChromeType.TitleOnly);

            if (prop.PropertyType == typeof(string))
            {
                newValue = RndService.RandomFromArray(values);
            }

            return(newValue);
        }
        public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop)
        {
            object newValue = null;

            var values = new List <string>();

            values.Add(BuiltInNumberFormatTypes.Automatic);

            values.Add(BuiltInNumberFormatTypes.FiveDecimals);
            values.Add(BuiltInNumberFormatTypes.FourDecimals);
            values.Add(BuiltInNumberFormatTypes.ThreeDecimals);
            values.Add(BuiltInNumberFormatTypes.TwoDecimals);
            values.Add(BuiltInNumberFormatTypes.OneDecimal);
            values.Add(BuiltInNumberFormatTypes.NoDecimal);

            newValue = RndService.RandomFromArray(values);

            return(newValue);
        }
        public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop)
        {
            object newValue = null;

            var values = new List <int>();

            values.Add(BuiltInWebpartPageTemplateId.spstd1);
            values.Add(BuiltInWebpartPageTemplateId.spstd2);
            values.Add(BuiltInWebpartPageTemplateId.spstd3);
            values.Add(BuiltInWebpartPageTemplateId.spstd4);
            values.Add(BuiltInWebpartPageTemplateId.spstd5);
            values.Add(BuiltInWebpartPageTemplateId.spstd6);
            values.Add(BuiltInWebpartPageTemplateId.spstd7);

            if (prop.PropertyType == typeof(int))
            {
                newValue = RndService.RandomFromArray(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);
        }
Beispiel #18
0
        public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop)
        {
            object newValue = null;

            var values = new List <string>();

            values.Add(BuiltInCompatibleSearchDataTypes.Integer);
            values.Add(BuiltInCompatibleSearchDataTypes.DateTime);
            values.Add(BuiltInCompatibleSearchDataTypes.Decimal);
            values.Add(BuiltInCompatibleSearchDataTypes.Text);
            values.Add(BuiltInCompatibleSearchDataTypes.YesNo);

            if (prop.PropertyType == typeof(string))
            {
                newValue = RndService.RandomFromArray(values);
            }

            if (prop.PropertyType == typeof(List <string>))
            {
                newValue = RndService.RandomArrayFromArray(values).ToList();
            }

            return(newValue);
        }
        public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop)
        {
            object newValue = null;

            var curentValue = prop.GetValue(obj) as string;

            if (curentValue == BuiltInDateTimeFieldFormatType.DateOnly)
            {
                newValue = BuiltInDateTimeFieldFormatType.DateTime;
            }
            if (curentValue == BuiltInDateTimeFieldFormatType.DateTime)
            {
                newValue = BuiltInDateTimeFieldFormatType.DateOnly;
            }
            else
            {
                newValue = RndService.RandomFromArray(new string[] {
                    BuiltInDateTimeFieldFormatType.DateOnly,
                    BuiltInDateTimeFieldFormatType.DateTime
                });
            }

            return(newValue);
        }