Exemplo n.º 1
0
 public void AddTestDatas()
 {
     for (int i = 0; i < 1; i++)
     {
         var entities = new List <Application>();
         for (int j = 0; j < 10000; j++)
         {
             var entity = new Application(Guid.NewGuid());
             entity.Code       = _builder.GenerateString(10);
             entity.Name       = _builder.GenerateChinese(30);
             entity.Note       = _builder.GenerateChinese(100);
             entity.Enabled    = _builder.GenerateBool();
             entity.CreateTime = _builder.GenerateDate();
             entities.Add(entity);
         }
         _repository.BulkInsert(entities);
     }
 }
Exemplo n.º 2
0
 public void TestGenerateDate()
 {
     Assert.IsTrue(_builder.GenerateDate() != DateTime.MinValue);
     Assert.IsTrue(_builder.GenerateDate() != DateTime.MaxValue);
 }