Examples of TitlePermalinkProvider


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

Examples of net.sourceforge.pebble.permalink.TitlePermalinkProvider

    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

Examples of net.sourceforge.pebble.permalink.TitlePermalinkProvider

  }

  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
Copyright © 2018 www.massapi.com. 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.