Exemplo n.º 1
0
        public void DeletePost()
        {
            Deleterepo.DeletePost(12);

            var post = Readrepo.GetPostByID(12);

            Assert.AreEqual(false, post.IsActive);
        }
Exemplo n.º 2
0
        public void EditPost()
        {
            Post newPost = new Post();

            newPost.PostID      = 15;
            newPost.CategoryID  = 3;
            newPost.UserID      = "b75da91b-e39a-42ce-b2f0-4834eda139e1";
            newPost.Title       = "Test post 44";
            newPost.CoverImgURL = "http://localhost:54909/Content/img/eating.jpg";
            newPost.Body        = "Hi";
            newPost.DateCreated = DateTime.Parse("12/07/2015");
            newPost.HasSchedule = false;
            newPost.IsPublished = false;
            newPost.IsActive    = false;

            Updaterepo.EditPost(newPost);

            var newbody = Readrepo.GetPostByID(15);

            Assert.AreEqual("Hi", newbody.Body);
        }
Exemplo n.º 3
0
        public void GetPostByID()
        {
            var post = Readrepo.GetPostByID(1);

            Assert.AreEqual("Golf Swing Workouts", post.Title);
        }