com.atlassian.confluence.api
Class RemoteContentServiceAcceptanceTest

java.lang.Object
  extended by com.atlassian.confluence.api.AbstractAcceptanceTest
      extended by com.atlassian.confluence.api.AbstractRemoteServiceAcceptanceTest
          extended by com.atlassian.confluence.api.RemoteContentServiceAcceptanceTest

public class RemoteContentServiceAcceptanceTest
extends AbstractRemoteServiceAcceptanceTest

Tests the Content REST API via the RemoteContentService.


Field Summary
static String EDITOR_FORMAT_CHEESE_MACRO
           
static String STORAGE_FORMAT_CHEESE_MACRO
           
 org.junit.rules.ExpectedException thrown
           
 
Fields inherited from class com.atlassian.confluence.api.AbstractRemoteServiceAcceptanceTest
proxyCreator
 
Fields inherited from class com.atlassian.confluence.api.AbstractAcceptanceTest
rpc, testHelper, testName
 
Constructor Summary
RemoteContentServiceAcceptanceTest()
           
 
Method Summary
protected  Collection<String> getExcludedMethodNamesForProxyTest()
          Returns a collection of method names to skip the proxy test for.
protected  Object getService()
           
protected  Class getServiceClass()
           
 void setUp()
           
 void testCanFetchPageWithExpandedBody()
           
 void testCannotUpdateDeletedPage()
           
 void testCanRestoreDeletedPage()
           
 void testCommentWithDeletedParent()
           
 void testContentPaginationIsCorrectWithDifferentPermissions()
           
 void testContentServiceDoesNotReturnHistoricalVersions()
           
 void testContentWithVersionButCollapsedState()
           
 void testCreateBlogComment()
           
 void testCreateBlogPost()
           
 void testCreateComment()
           
 void testCreateCommentWithParent()
           
 void testCreatePage()
           
 void testCreatePageWithBodyRequiringContext()
           
 void testCreatePageWithDuplicateTitle()
           
 void testCreatePageWithEditorFormat()
           
 void testDeleteBlogPost()
           
 void testDeleteComment()
           
 void testDeletePage()
           
 void testDeleteUnknownContent()
           
 void testDeleteUnpermittedContent()
           
 void testFetchContentWithAncestorsExpanded()
           
 void testFindCommentByIdWithContainerExpansion()
           
 void testFindCommentByIdWithNoExpansions()
           
 void testFindCurrentContentByDate()
           
 void testGetAllCurrentAndTrashedPages()
           
 void testGetAllCurrentAndTrashedPagesBySpace()
           
 void testGetAllCurrentBlogPosts()
           
 void testGetAllCurrentBlogPostsBySpace()
           
 void testGetAllCurrentPagesBySpace()
           
 void testGetAllTrashedPagesBySpace()
           
 void testGetContentByIdWithLikesExpanded()
           
 void testGetContentIncludesUnprocessedBodyWithSubMacros()
           
 void testGetContentIncludesUnprocessedBodyWithTables()
          Unprocessed macros should not have their rich text bodies processed when converting STORAGE to VIEW.
 void testGetCurrentBlogBySpaceKeyTitleAndDate()
           
 void testGetCurrentContentBySpaceKeyAndTitle()
           
 void testGetCurrentPagesBySpaceAndCreationDate()
          Test find by date can just be used for blog posts.
 void testGetCurrentPagesBySpaceAndTitle()
           
 void testGetHistoricalContentFailsWithoutVersion()
           
 void testGetMissingContentById()
           
 void testGetPageById()
           
 void testGetPageByIdExpandExportView()
           
 void testReturnedIdIsAlwaysTheMainOne()
           
 void testsGetContentByIdWithLabelsExpanded()
           
 void testUpdateBlogPostContent()
           
 void testUpdateCommentContent()
           
 void testUpdatePageContent()
           
 void testUpdatePageWithParent()
           
 void testUpdateWithoutVersionThrowsBadRequest()
           
 
Methods inherited from class com.atlassian.confluence.api.AbstractRemoteServiceAcceptanceTest
checkPageResponse, loginIfNotAlready, prepareMspacesWithNpages, prepareSpacesAndUsersWithCascadedVisibility, proxySetUp, spaceByNumber, testServiceProxy, userByNumber
 
Methods inherited from class com.atlassian.confluence.api.AbstractAcceptanceTest
commonSetUp, exceptionSupplier, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EDITOR_FORMAT_CHEESE_MACRO

public static final String EDITOR_FORMAT_CHEESE_MACRO
See Also:
Constant Field Values

STORAGE_FORMAT_CHEESE_MACRO

public static final String STORAGE_FORMAT_CHEESE_MACRO
See Also:
Constant Field Values

thrown

public org.junit.rules.ExpectedException thrown
Constructor Detail

RemoteContentServiceAcceptanceTest

public RemoteContentServiceAcceptanceTest()
Method Detail

getService

protected Object getService()
Specified by:
getService in class AbstractRemoteServiceAcceptanceTest
Returns:
the proxy of the API Service under test.

getServiceClass

protected Class getServiceClass()
Specified by:
getServiceClass in class AbstractRemoteServiceAcceptanceTest
Returns:
the class of the API Service under test.

getExcludedMethodNamesForProxyTest

protected Collection<String> getExcludedMethodNamesForProxyTest()
Description copied from class: AbstractRemoteServiceAcceptanceTest
Returns a collection of method names to skip the proxy test for.

Overridden by test classes for services with methods that are known to be implemented on the proxy, but not able to be tested with the logic in testServiceProxy. If we end up fixing the logic, these exclusions can (and should) be removed.

Overrides:
getExcludedMethodNamesForProxyTest in class AbstractRemoteServiceAcceptanceTest

setUp

public void setUp()
           throws Exception
Throws:
Exception

testGetPageById

public void testGetPageById()
                     throws ServiceException
Throws:
ServiceException

testGetPageByIdExpandExportView

public void testGetPageByIdExpandExportView()
                                     throws Exception
Throws:
Exception

testContentPaginationIsCorrectWithDifferentPermissions

public void testContentPaginationIsCorrectWithDifferentPermissions()
                                                            throws Exception
Throws:
Exception

testFindCommentByIdWithNoExpansions

public void testFindCommentByIdWithNoExpansions()
                                         throws Exception
Throws:
Exception

testFindCommentByIdWithContainerExpansion

public void testFindCommentByIdWithContainerExpansion()
                                               throws Exception
Throws:
Exception

testGetMissingContentById

public void testGetMissingContentById()
                               throws Exception
Throws:
Exception

testGetCurrentContentBySpaceKeyAndTitle

public void testGetCurrentContentBySpaceKeyAndTitle()
                                             throws Exception
Throws:
Exception

testGetCurrentBlogBySpaceKeyTitleAndDate

public void testGetCurrentBlogBySpaceKeyTitleAndDate()
                                              throws Exception
Throws:
Exception

testGetAllCurrentPagesBySpace

public void testGetAllCurrentPagesBySpace()
                                   throws Exception
Throws:
Exception

testGetAllTrashedPagesBySpace

public void testGetAllTrashedPagesBySpace()
                                   throws Exception
Throws:
Exception

testGetAllCurrentAndTrashedPagesBySpace

public void testGetAllCurrentAndTrashedPagesBySpace()
                                             throws Exception
Throws:
Exception

testGetAllCurrentAndTrashedPages

public void testGetAllCurrentAndTrashedPages()
                                      throws Exception
Throws:
Exception

testGetAllCurrentBlogPostsBySpace

public void testGetAllCurrentBlogPostsBySpace()
                                       throws Exception
Throws:
Exception

testGetAllCurrentBlogPosts

public void testGetAllCurrentBlogPosts()
                                throws Exception
Throws:
Exception

testGetCurrentPagesBySpaceAndTitle

public void testGetCurrentPagesBySpaceAndTitle()
                                        throws Exception
Throws:
Exception

testGetCurrentPagesBySpaceAndCreationDate

public void testGetCurrentPagesBySpaceAndCreationDate()
                                               throws Exception
Test find by date can just be used for blog posts. For pages, creation date defaults to _now_.

Throws:
Exception

testFindCurrentContentByDate

public void testFindCurrentContentByDate()
                                  throws Exception
Throws:
Exception

testGetContentByIdWithLikesExpanded

public void testGetContentByIdWithLikesExpanded()
                                         throws Exception
Throws:
Exception

testsGetContentByIdWithLabelsExpanded

public void testsGetContentByIdWithLabelsExpanded()
                                           throws ServiceException
Throws:
ServiceException

testContentServiceDoesNotReturnHistoricalVersions

public void testContentServiceDoesNotReturnHistoricalVersions()
                                                       throws BadRequestException
Throws:
BadRequestException

testCreatePage

public void testCreatePage()
                    throws ServiceException
Throws:
ServiceException

testCreatePageWithDuplicateTitle

public void testCreatePageWithDuplicateTitle()
                                      throws ServiceException
Throws:
ServiceException

testCreatePageWithEditorFormat

public void testCreatePageWithEditorFormat()
                                    throws ServiceException
Throws:
ServiceException

testCreateBlogPost

public void testCreateBlogPost()
                        throws ServiceException
Throws:
ServiceException

testCreateComment

public void testCreateComment()
                       throws Exception
Throws:
Exception

testCreateCommentWithParent

public void testCreateCommentWithParent()
                                 throws Exception
Throws:
Exception

testCreateBlogComment

public void testCreateBlogComment()
                           throws Exception
Throws:
Exception

testUpdatePageContent

public void testUpdatePageContent()
                           throws Exception
Throws:
Exception

testUpdateBlogPostContent

public void testUpdateBlogPostContent()
                               throws Exception
Throws:
Exception

testUpdateCommentContent

public void testUpdateCommentContent()
                              throws Exception
Throws:
Exception

testUpdatePageWithParent

public void testUpdatePageWithParent()
                              throws Exception
Throws:
Exception

testUpdateWithoutVersionThrowsBadRequest

public void testUpdateWithoutVersionThrowsBadRequest()

testDeletePage

public void testDeletePage()
                    throws Exception
Throws:
Exception

testDeleteBlogPost

public void testDeleteBlogPost()
                        throws Exception
Throws:
Exception

testDeleteComment

public void testDeleteComment()
                       throws Exception
Throws:
Exception

testDeleteUnpermittedContent

public void testDeleteUnpermittedContent()
                                  throws ServiceException
Throws:
ServiceException

testDeleteUnknownContent

public void testDeleteUnknownContent()
                              throws ServiceException
Throws:
ServiceException

testCannotUpdateDeletedPage

public void testCannotUpdateDeletedPage()
                                 throws Exception
Throws:
Exception

testCanRestoreDeletedPage

public void testCanRestoreDeletedPage()
                               throws Exception
Throws:
Exception

testContentWithVersionButCollapsedState

public void testContentWithVersionButCollapsedState()
                                             throws ServiceException
Throws:
ServiceException

testCreatePageWithBodyRequiringContext

public void testCreatePageWithBodyRequiringContext()
                                            throws ServiceException
Throws:
ServiceException

testCanFetchPageWithExpandedBody

public void testCanFetchPageWithExpandedBody()
                                      throws ServiceException
Throws:
ServiceException

testFetchContentWithAncestorsExpanded

public void testFetchContentWithAncestorsExpanded()
                                           throws ServiceException
Throws:
ServiceException

testGetContentIncludesUnprocessedBodyWithTables

public void testGetContentIncludesUnprocessedBodyWithTables()
                                                     throws Exception
Unprocessed macros should not have their rich text bodies processed when converting STORAGE to VIEW. See: https://jira.atlassian.com/browse/CONF-33938

Throws:
Exception

testCommentWithDeletedParent

public void testCommentWithDeletedParent()

testGetContentIncludesUnprocessedBodyWithSubMacros

public void testGetContentIncludesUnprocessedBodyWithSubMacros()
                                                        throws Exception
Throws:
Exception

testGetHistoricalContentFailsWithoutVersion

public void testGetHistoricalContentFailsWithoutVersion()

testReturnedIdIsAlwaysTheMainOne

public void testReturnedIdIsAlwaysTheMainOne()


Copyright © 2003–2015 Atlassian. All rights reserved.