Package net.sourceforge.pebble.domain

Examples of net.sourceforge.pebble.domain.BlogEntry


  protected void setUp() throws Exception {
    super.setUp();

    decorator = new NoFollowDecorator();
    blogEntry = new BlogEntry(blog);
  }
View Full Code Here


  private ContentDecoratorContext context;

  protected void setUp() throws Exception {
    super.setUp();

    blogEntry = new BlogEntry(blog);
    decorator = new SocialBookmarksDecorator();
    context = new ContentDecoratorContext();
  }
View Full Code Here

  protected void setUp() throws Exception {
    super.setUp();

    decorator = new DisableCommentsDecorator();
    blogEntry = new BlogEntry(blog);
  }
View Full Code Here

  private ContentDecoratorContext context;

  protected void setUp() throws Exception {
    super.setUp();

    blogEntry = new BlogEntry(blog);
    decorator = new TechnoratiTagsDecorator();
    context = new ContentDecoratorContext();
  }
View Full Code Here

  private ContentDecoratorContext context;

  protected void setUp() throws Exception {
    super.setUp();

    blogEntry = new BlogEntry(blog);
    staticPage = new StaticPage(blog);
    decorator = new RelativeUriDecorator();
    context = new ContentDecoratorContext();
    decorator.setBlog(blog);
  }
View Full Code Here

  private static final String PDF_IMG = "<img src=\"common/images/pdf_logo.gif\" alt=\"Export this post as PDF document\" align=\"bottom\" border=\"0\" />";

  protected void setUp() throws Exception {
    super.setUp();
    blogEntryOne = new BlogEntry(blog);
    decorator = new EntryToPdfDecorator();
    context = new ContentDecoratorContext();
  }
View Full Code Here

  }

  public void testProcess() throws Exception {
    View view = action.process(request, response);

    BlogEntry blogEntry = (BlogEntry)action.getModel().get(Constants.BLOG_ENTRY_KEY);
    assertNotNull("No blog entry was created", blogEntry);
    assertFalse(blogEntry.isPersistent());

    assertTrue(view instanceof BlogEntryFormView);
  }
View Full Code Here

    assertTrue(view instanceof NotFoundView);
  }

  public void testPublishedViewBlogEntry() throws Exception {
    BlogEntry blogEntry1 = new BlogEntry(blog);
    blogEntry1.setPublished(true);
    BlogService service = new BlogService();
    service.putBlogEntry(blogEntry1);

    SecurityUtils.runAsUnauthenticated();
    request.setParameter("entry", blogEntry1.getId());
    View view = action.process(request, response);

    BlogEntry blogEntry2 = (BlogEntry)action.getModel().get(Constants.BLOG_ENTRY_KEY);
    assertEquals(blogEntry1.getId(), blogEntry2.getId());
    assertTrue(view instanceof BlogEntryView);
  }
View Full Code Here

    assertEquals(blogEntry1.getId(), blogEntry2.getId());
    assertTrue(view instanceof BlogEntryView);
  }

  public void testUnpublishedViewBlogEntryAsAnonymousUser() throws Exception {
    BlogEntry blogEntry1 = new BlogEntry(blog);
    blogEntry1.setPublished(false);
    BlogService service = new BlogService();
    service.putBlogEntry(blogEntry1);

    SecurityUtils.runAsAnonymous();
    request.setParameter("entry", blogEntry1.getId());
    View view = action.process(request, response);

    BlogEntry blogEntry2 = (BlogEntry)action.getModel().get(Constants.BLOG_ENTRY_KEY);
    assertNull(blogEntry2);
    assertTrue(view instanceof NotFoundView);
  }
View Full Code Here

    assertNull(blogEntry2);
    assertTrue(view instanceof NotFoundView);
  }

  public void testUnpublishedViewBlogEntryAsUserThatIsAuthorisedForBlog() throws Exception {
    BlogEntry blogEntry1 = new BlogEntry(blog);
    blogEntry1.setPublished(false);
    BlogService service = new BlogService();
    service.putBlogEntry(blogEntry1);

    SecurityUtils.runAsBlogContributor();
    request.setParameter("entry", blogEntry1.getId());
    View view = action.process(request, response);

    BlogEntry blogEntry2 = (BlogEntry)action.getModel().get(Constants.BLOG_ENTRY_KEY);
    assertEquals(blogEntry1.getId(), blogEntry2.getId());
    assertTrue(view instanceof BlogEntryView);
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.pebble.domain.BlogEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.