Package net.sourceforge.pebble.permalink

Examples of net.sourceforge.pebble.permalink.TitlePermalinkProvider


    BlogEntry be = new BlogEntry(blog);
    be.setTitle("Test blog entry");
    BlogService service = new BlogService();
    service.putBlogEntry(be);
    String permalink = "/" + be.getPermalink().substring(PebbleContext.getInstance().getConfiguration().getUrl().length());
    blog.setPermalinkProvider(new TitlePermalinkProvider());
    url = new Request(permalink, blog);
    assertEquals("Blog Entry : Test blog entry", url.getName());
  }
View Full Code Here


    service.putBlogEntry(blogEntry);
    assertEquals("/viewBlogEntry.action?entry=" + blogEntry.getId(), transformer.getUri(blog.getPermalinkProvider().getPermalink(blogEntry), blog));
  }

  public void testBlogEntryWithTitlePermalinkProvider() throws Exception {
    blog.setPermalinkProvider(new TitlePermalinkProvider());

    BlogService service = new BlogService();
    BlogEntry blogEntry = new BlogEntry(blog);
    blogEntry.setTitle("Some title");
    service.putBlogEntry(blogEntry);
View Full Code Here

  }

  public void testBlogEntryFallsBackToDefaultPermalinkProvider() throws Exception {
    DefaultPermalinkProvider defaultProvider = new DefaultPermalinkProvider();
    defaultProvider.setBlog(blog);
    blog.setPermalinkProvider(new TitlePermalinkProvider());

    BlogService service = new BlogService();
    BlogEntry blogEntry = new BlogEntry(blog);
    blogEntry.setTitle("Some title");
    service.putBlogEntry(blogEntry);
View Full Code Here

TOP

Related Classes of net.sourceforge.pebble.permalink.TitlePermalinkProvider

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.