public void CanAnCommentBeUpdated() { var maxid = _testRepo.FindAll().Min(m => m.commentid); Comment a = new Comment() { commentid = maxid, shorttext = "Some image from test", body = "Some Name from test", userid = 1, contentid = 1 }; _testRepo.Update(a); var updatedComment = _testRepo.FindByID(maxid); Assert.AreEqual(a.shorttext, updatedComment.shorttext); }
public void Put(int id, [FromBody] Comment data) { CommentRepo.Update(data); _log.LogInformation($"The Comment that was updated {JsonConvert.SerializeObject(data)}"); }