public static GuideV1 CreateGuide() { return(new GuideV1 { Id = IdGenerator.NextLong(), Name = RandomText.Name(), Type = RandomGuideType(), App = RandomText.Phrase(1, 50), MinVer = RandomLong.NextLong(int.MaxValue), MaxVer = RandomLong.NextLong(int.MaxValue), Tags = new List <string> { RandomText.Stuff(), IdGenerator.NextLong(), RandomText.Color(), RandomText.Name(), RandomText.Phone(), RandomText.Adjective(), "tag1" }, AllTags = new List <string> { RandomText.Stuff(), RandomText.Color(), RandomText.Name(), RandomText.Phone(), RandomText.Adjective() }, Status = RandomText.Verb(), CreateTime = DateTime.UtcNow, Pages = new List <GuidePageV1> { new GuidePageV1 { Title = new Dictionary <string, string> { { IdGenerator.NextShort(), RandomText.Word() }, { IdGenerator.NextShort(), RandomText.Word() } }, Content = new Dictionary <string, string> { { IdGenerator.NextShort(), RandomText.Word() }, { IdGenerator.NextShort(), RandomText.Word() } }, Color = RandomText.Color(), PicId = IdGenerator.NextShort(), PicUri = IdGenerator.NextLong() }, new GuidePageV1 { Title = new Dictionary <string, string> { { IdGenerator.NextShort(), RandomText.Word() }, { IdGenerator.NextShort(), RandomText.Word() } }, Content = new Dictionary <string, string> { { IdGenerator.NextShort(), RandomText.Word() }, { IdGenerator.NextShort(), RandomText.Word() } }, Color = RandomText.Color(), PicId = IdGenerator.NextShort(), PicUri = IdGenerator.NextLong() } } }); }
public static BlobInfoV1 Blob() { return(new BlobInfoV1 { Id = IdGenerator.NextLong(), Group = RandomText.Name(), Name = RandomText.Name(), Size = RandomLong.NextLong(100, 100000), ContentType = RandomArray.Pick(new string[] { "text/plain", "application/binary", "application/json" }), CreateTime = DateTime.UtcNow, ExpireTime = RandomDateTime.NextDateTime(DateTime.UtcNow, new DateTime(2010, 1, 1)), Completed = RandomBoolean.NextBoolean() }); }