org.alfresco.repo.blog
Class BlogServiceImplTest

java.lang.Object
  extended by org.alfresco.repo.blog.BlogServiceImplTest

public class BlogServiceImplTest
extends java.lang.Object

Test cases for BlogServiceImpl.

Since:
4.0

Constructor Summary
BlogServiceImplTest()
           
 
Method Summary
 void createDraftBlogPostsAndGetPagedResults()
           
 void createTaggedDraftBlogPost()
           
static void deleteClassTestNodesAndUsers()
           
 void deleteTestNodes()
           
 void ensureBlogPostsAreCorrectlySorted()
           
 void findBlogPostsByPublishedDate()
          This test method uses the eventually consistent find*() method and so may fail if Lucene is disabled.
 void getBlogPostsFilteredByDateRange()
           
static void initTestsContext()
           
 void multipleUsersCreateDraftsAndPublishedPostsAndBrowse()
          This test uses two different users to create draft and internally published blog posts.
 void setAdminUser()
          By default, all tests are run as the admin user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlogServiceImplTest

public BlogServiceImplTest()
Method Detail

initTestsContext

public static void initTestsContext()
                             throws java.lang.Exception
Throws:
java.lang.Exception

setAdminUser

public void setAdminUser()
By default, all tests are run as the admin user.


deleteTestNodes

public void deleteTestNodes()
                     throws java.lang.Exception
Throws:
java.lang.Exception

deleteClassTestNodesAndUsers

public static void deleteClassTestNodesAndUsers()
                                         throws java.lang.Exception
Throws:
java.lang.Exception

createDraftBlogPostsAndGetPagedResults

public void createDraftBlogPostsAndGetPagedResults()
                                            throws java.lang.Exception
Throws:
java.lang.Exception

createTaggedDraftBlogPost

public void createTaggedDraftBlogPost()
                               throws java.lang.Exception
Throws:
java.lang.Exception

findBlogPostsByPublishedDate

public void findBlogPostsByPublishedDate()
                                  throws java.lang.Exception
This test method uses the eventually consistent find*() method and so may fail if Lucene is disabled.

Throws:
java.lang.Exception

ensureBlogPostsAreCorrectlySorted

public void ensureBlogPostsAreCorrectlySorted()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

multipleUsersCreateDraftsAndPublishedPostsAndBrowse

public void multipleUsersCreateDraftsAndPublishedPostsAndBrowse()
                                                         throws java.lang.Exception
This test uses two different users to create draft and internally published blog posts. Then it ensures that each user sees the correct posts when they retrieve them from the service.

Throws:
java.lang.Exception

getBlogPostsFilteredByDateRange

public void getBlogPostsFilteredByDateRange()
                                     throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.