Beispiel #1
0
 public async Task CreateDocument2_Test()
 {
     var user = new User
     {
         uid = "123",
         name = "aotuo"
     };
     var res = await _iDBoperation.CreateDocument(user);
     Assert.AreEqual(user.name, res.Resource.GetPropertyValue<string>("name"));
     Assert.AreEqual(user.uid, res.Resource.GetPropertyValue<string>("uid"));
     await _iDBoperation.DeleteDocById(res.Resource.Id);
 }
Beispiel #2
0
 public async Task DeleteDocByIdList_Test()
 {
     var list = new List<string>();
     for (var i = 0; i < 3; i++)
     {
         var user = new User
         {
             uid = "123",
             name = "aotuo"
         };
         var res = await _iDBoperation.CreateDocument(user);
         Assert.IsNotNull(res.Resource.Id);
         list.Add(res.Resource.Id);
     }
     await _iDBoperation.DeleteDocByIdList(null, list);
     foreach (var id in list)
     {
         var res2 = _iDBoperation.GetDocumentById(null, id);
         Assert.IsNull(res2);
     }
 }