Beispiel #1
0
 public static FakeOrder Fake()
 {
     return(new FakeOrder()
     {
         Id = Guid.NewGuid(),
         UserId = Guid.NewGuid(),
         ProductId = Guid.NewGuid(),
         Recipient = FakeUtility.CreatePersonName(GenderType.None),
         Amount = FakeUtility.RandomDouble(10, 1000),
         Address = "测试地址",
         Number = FakeUtility.RandomInt(1, 10),
         CreateTime = DateTime.Now
     });
 }
 public static FakeProduct Fake()
 {
     return(new FakeProduct()
     {
         Id = Guid.NewGuid(),
         Title = "商品" + Guid.NewGuid().GetHashCode(),
         Description = string.Empty,
         Price = FakeUtility.RandomDouble(1, 1000),
         Picture = string.Empty,
         SourceUri = string.Empty,
         Follows = FakeUtility.RandomInt(1, 100),
         SourceSite = string.Empty,
         Status = (ProductStatusType)FakeUtility.RandomInt(0, 3),
         VisitTotal = FakeUtility.RandomInt(1, 10),
         CreateTime = DateTime.Now
     });
 }