Ejemplo n.º 1
0
        public void TestGenerateBool()
        {
            var result = new List <bool>();

            for (int i = 0; i < 100; i++)
            {
                result.Add(_builder.GenerateBool());
            }
            Assert.IsTrue(result.Contains(true), "true");
            Assert.IsTrue(result.Contains(false), "false");
        }
Ejemplo n.º 2
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);
     }
 }