public void CanANewCommentBeCreated() { Comment a = new Comment() { commentid = 99, shorttext = "Some image from test", body = "Some Name from test", userid = 1, contentid = 1 }; _testRepo.Add(a); var insertedComment = _testRepo.FindAll().Where(w => w.shorttext == a.shorttext).First(); Assert.AreEqual(a.shorttext, insertedComment.shorttext); }
public IActionResult GetComments() { _log.LogInformation(CommentRepo.getConnectionString()); return(Ok(CommentRepo.FindAll())); }