Package net.sourceforge.pebble.domain

Examples of net.sourceforge.pebble.domain.BlogEntry


  /**
   * Tests that a single published blog entry can be indexed.
   */
  public void testIndexPublishedBlogEntry() throws Exception {
    BlogEntry blogEntry = new BlogEntry(blog);
    blogEntry.setAuthor("sbrown");
    blogEntry.setPublished(true);
    index.index(blogEntry);

    assertTrue(index.getAuthors().contains("sbrown"));
    assertEquals(1, index.getRecentBlogEntries("sbrown").size());
    assertEquals(blogEntry.getId(), index.getRecentBlogEntries("sbrown").get(0));
  }
View Full Code Here


  /**
   * Tests that a single unpublished blog entry isn't indexed.
   */
  public void testIndexUnpublishedBlogEntry() throws Exception {
    BlogEntry blogEntry = new BlogEntry(blog);
    blogEntry.setAuthor("sbrown");
    blogEntry.setPublished(false);
    index.index(blogEntry);

    assertFalse(index.getAuthors().contains("sbrown"));
    assertEquals(0, index.getRecentBlogEntries("sbrown").size());
  }
View Full Code Here

  /**
   * Tests that a single blog entry can be unindexed.
   */
  public void testUnindexBlogEntry() throws Exception {
    BlogEntry blogEntry = new BlogEntry(blog);
    blogEntry.setAuthor("sbrown");
    blogEntry.setPublished(true);
    index.index(blogEntry);

    assertTrue(index.getAuthors().contains("sbrown"));
    assertEquals(1, index.getRecentBlogEntries("sbrown").size());
    assertEquals(blogEntry.getId(), index.getRecentBlogEntries("sbrown").get(0));

    index.unindex(blogEntry);

    assertFalse(index.getAuthors().contains("sbrown"));
    assertEquals(0, index.getRecentBlogEntries("sbrown").size());
View Full Code Here

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

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

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

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

    super.setUp();

    // default for RelatedPostsDecorator.MAX_POSTS is 5
    blog.getPluginProperties().setProperty(RelatedPostsDecorator.MAX_POSTS, "6");

    blogEntryOne = new BlogEntry(blog);
    blogEntryTwo = new BlogEntry(blog);
    blogEntryThree = new BlogEntry(blog);
    blogEntryFour = new BlogEntry(blog);
    blogEntryFive = new BlogEntry(blog);
    blogEntrySix = new BlogEntry(blog);
    blogEntrySeven = new BlogEntry(blog);
    blogEntryEight = new BlogEntry(blog);

    service = new BlogService();

    decorator = new RelatedPostsDecorator();
    context = new ContentDecoratorContext();
View Full Code Here

  private ContentDecoratorContext context;

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

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

  private ContentDecoratorContext context;

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

    blogEntry = new BlogEntry(blog);
    blogEntry.setTitle("Title");
    blogEntry.setBody("Body");
    Calendar cal= blog.getCalendar();
    cal.set(Calendar.YEAR, 2006);
    cal.set(Calendar.MONTH, 6);
View Full Code Here

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

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

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

    decorator = new DisableResponseDecorator();
    blogEntry = new BlogEntry(blog);
  }
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.