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> /// Gets the specified entity by ID. /// </summary> /// <param name="id">The user ID.</param> public override User GetById(int id) { return(_userDataService.GetById(id)); }