public void GetSaveDeleteUser()
        {
            var dataReplyT = _service.GetById(1);

            Assert.AreEqual(DataReplyStatus.Ok, dataReplyT.Status);

            var user = dataReplyT.Data;

            user.Id    = 0;
            user.Login = $"{user.Login}a";
            user.Name  = $"{user.Name}a";
            user.Email = $"a{user.Email}";

            dataReplyT = _service.Save(user);

            Assert.AreEqual(DataReplyStatus.Ok, dataReplyT.Status);

            user = dataReplyT.Data;

            Assert.IsNotNull(user);
            Assert.IsTrue(user.Id > 0);

            var dataReply = _service.Delete(user.Id);

            Assert.AreEqual(DataReplyStatus.Ok, dataReply.Status);
        }
 /// <summary>
 /// Deletes the specified entity.
 /// </summary>
 /// <param name="user">The user entity.</param>
 public override void Delete(User user)
 {
     _userDataService.Delete(user);
 }
Exemple #3
0
 /*
  * Please view method description in UserBusinessInterface
  */
 public bool DeleteUser(User user)
 {
     return(service.Delete(user));
 }