Example #1
0
 public static EmptyMediaItemBuilder UseRandom(this EmptyMediaItemBuilder builder)
 {
     return(builder
            .Title(string.Empty.GetRandom())
            .DisplayWidth(4096.GetRandom(600))
            .DisplayHeight(3072.GetRandom(240))
            .CreateDate(DateTime.Now.AddYears(30).GetRandom(DateTime.Now.AddYears(-10))));
 }
        public static MediaPostBuilder UseRandomEmptyPost(this MediaPostBuilder builder)
        {
            var tags = new List <string>();

            for (Int32 i = 0; i < _maxTags.GetRandom(); i++)
            {
                tags.Add(string.Empty.GetRandom());
            }

            var emptyPost = new EmptyMediaItemBuilder()
                            .UseRandom()
                            .Build();

            return(builder
                   .AddEmptyPost(emptyPost.Title, emptyPost.DisplayWidth, emptyPost.DisplayHeight, emptyPost.CreateDate)
                   .Author(string.Empty.GetRandom())
                   .Description(string.Empty.GetRandom())
                   .IsPublished(true.GetRandom())
                   .Posted(DateTime.Now.AddYears(30).GetRandom(DateTime.Now.AddYears(-10)))
                   .AddTags(tags)
                   .Title(string.Empty.GetRandom()));
        }