public void Sync_To_Wordpress()
        {
            WordpressService.Arrange(ws => ws.SyncToWordpress(Post));

            Target.Create(Post);

            WordpressService.Assert(ws => ws.SyncToWordpress(Post), Occurs.Once());
        }
        public void Authorize_Wordpress()
        {
            WordpressService.Arrange(ws => ws.AuthorizeUser(Arg.AnyString));

            Target.Edit(new BlogPostEditViewModel(Post, Context));

            WordpressService.Assert(ws => ws.AuthorizeUser(Arg.AnyString));
        }
        public void Sync_To_Wordpress()
        {
            WordpressService.Arrange(ws => ws.SyncToWordpress(Post));

            Target.Edit(new BlogPostEditViewModel(Post, Context));

            WordpressService.Assert(ws => ws.SyncToWordpress(Post), Occurs.Once());
        }
示例#4
0
        public void Delete_Draft_From_Wordpress()
        {
            WordpressService.Arrange(ws => ws.DeleteFromWordpress(Arg.IsAny <BlogPost>()));

            Target.Delete(PostId);

            WordpressService.Assert(ws => ws.DeleteFromWordpress(Post));
        }
示例#5
0
        public void Authorize_In_Wordpress()
        {
            WordpressService.Arrange(ws => ws.AuthorizeUser(Arg.AnyString));

            Target.Delete(PostId);

            WordpressService.Assert(ws => ws.AuthorizeUser(Arg.AnyString));
        }
示例#6
0
        public void Authorize_Wordpress()
        {
            WordpressService.Arrange(ws => ws.AuthorizeUser(Arg.AnyString));
            WordpressService.Arrange(wps => wps.GetBlogPostById(Post.WordpressId)).Returns(Post);

            Target.Review(Post.Id);

            WordpressService.Assert(ws => ws.AuthorizeUser(Arg.AnyString));
        }
        public void Only_Sync_To_Wordpress_When_Post_Has_WordpressId()
        {
            WordpressService.Arrange(ws => ws.SyncToWordpress(Post));

            Post.WordpressId = 0;

            Target.Edit(new BlogPostEditViewModel(Post, Context));

            WordpressService.Assert(ws => ws.SyncToWordpress(Post), Occurs.Never());
        }