예제 #1
0
        public void RepoPostTestsUpdatePostContent()
        {
            List <Posts> postdb = new List <Posts>
            {
                new Posts {
                    PostsID = 0, Content = "Hi"
                }
            };

            _postSet.Object.AddRange(postdb);
            ConnectMocksToDataStore(postdb);
            Posts expected = new Posts {
                PostsID = 0, Content = "Bye"
            };
            Posts actual = _repo.GetPostByID(0);
            bool  result = _repo.EditPostContent(0, "Bye");

            Assert.AreEqual(expected, actual);
            Assert.IsTrue(result);
        }