Package com.jdkcn.myblog.domain

Examples of com.jdkcn.myblog.domain.Blog


  @Get
  public void get() {
    myblogInitializer.checkInit();
    message = "Welcome to myblog 2.0";
    blog = new Blog();
    blog.setName("Myblog 2.0");
    blog.setTheme("prototype");
    Category exist = categoryService.getByName("Test Entry Category", null);
    if (exist == null) {
      exist = new Category("Test Entry Category", Type.ENTRY);
View Full Code Here


    this.email = email;
    checkInit();
  }

  private Blog createDefaultBlog(User user) {
    Blog blog = new Blog();
    blog.setName("Another Myblog");
    blog.setDefaultPageSize(Constants.DEFAULT_PAGE_SIZE);
    blog.setDescription("Another Myblog.");
    blog.addUrl("http://code.google.com/p/myblog");
    blog.setOwner(user);
    return blogService.saveOrUpdate(blog);
  }
View Full Code Here

  @Override
  public void before() {
    super.before();
    commentService = injector.getInstance(CommentService.class);
    BlogService blogService = injector.getInstance(BlogService.class);
    blog = new Blog();
    blog.setName("Test blog");
    blog.addUrl("http://jdkcn.com");
    blog = blogService.saveOrUpdate(blog);
   
    UserService userService = injector.getInstance(UserService.class);
View Full Code Here

    blogService = injector.getInstance(BlogService.class);
  }
 
  @Test
  public void testCreateOrUpdate() throws Exception {
    Blog blog = new Blog();
    blog.setName("Just Myblog.");
    blog.addUrl("http://jdkcn.com");
   
    assertNull(blog.getId());
   
    String blogId = blogService.saveOrUpdate(blog).getId();
   
    assertNotNull(blogId);
    assertNull(blog.getId());
   
    Blog savedBlog = blogService.get(blogId);
    assertEquals("Just Myblog.", savedBlog.getName());
   
  }
View Full Code Here

    author.setEmail("tester@gmail.com");
    author = userService.saveOrUpdate(author);
  }

  private Blog createBlog(String name, BlogService blogService) {
    Blog blog = new Blog();
    blog.setName(name);
    blog.setDescription(name + "'s description");
    blog = blogService.saveOrUpdate(blog);
    return blog;
  }
View Full Code Here

TOP

Related Classes of com.jdkcn.myblog.domain.Blog

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.