com.atlassian.confluence.rest
Class AbstractRestAcceptanceTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by net.sourceforge.jwebunit.junit.WebTestCase
              extended by com.atlassian.confluence.rest.AbstractRestAcceptanceTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
BreadcrumbsAcceptanceTest, CommentAcceptanceTest, ContentAcceptanceTest, I18nAcceptanceTest, KeyboardShortcutAcceptanceTest, MailAcceptanceTest, PageAcceptanceTest, RestAttachmentAcceptanceTest, RestSearchAcceptanceTest, RestSpaceAcceptanceTest, RestSpaceListAcceptanceTest, UserHistoryAcceptanceTest

public abstract class AbstractRestAcceptanceTest
extends net.sourceforge.jwebunit.junit.WebTestCase

Because we don't want to be YET ANOTHER subclass of the monstrosity known as ACAT. Every time you think "Hey, I need some functionality from AbstractConfluenceAcceptanceTest", why not move it into the test-support module?


Field Summary
protected  com.sun.jersey.api.client.WebResource adminRootResource
           
protected  String baseUrl
           
protected  com.sun.jersey.api.client.Client client
           
protected  LoginHelper loginHelper
           
protected  com.sun.jersey.api.client.WebResource rootResource
           
protected  ConfluenceRpc rpc
           
protected  ServerStateManager serverStateManager
           
protected  TestData testData
           
protected  UserManagementHelper userHelper
           
 
Fields inherited from class net.sourceforge.jwebunit.junit.WebTestCase
tester
 
Constructor Summary
AbstractRestAcceptanceTest()
           
 
Method Summary
protected  void assertLink(String rel, String href, com.atlassian.plugins.rest.common.Link link)
           
protected  JSONObject doGet(com.sun.jersey.api.client.WebResource resource)
           
protected
<T> T
doGet(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass)
           
protected
<T> T
doGet(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass, String requestType)
           
protected  URI doPost(com.sun.jersey.api.client.WebResource resource, Object entity)
           
protected
<T> T
doPut(com.sun.jersey.api.client.WebResource resource, T entity)
           
protected  com.sun.jersey.api.client.WebResource expand(com.sun.jersey.api.client.WebResource webResource, String... values)
           
protected  com.sun.jersey.api.client.WebResource expandWithIndexes(com.sun.jersey.api.client.WebResource webResource, String value, int start, int end)
           
protected  ContentEntity getContentWithId(List<ContentEntity> entities, String id)
           
protected  com.sun.jersey.api.client.WebResource getResource(URI uri, User user)
           
protected  com.sun.jersey.api.client.WebResource getRootResource(User user)
           
protected  void setUp()
           
protected  void tearDown()
           
 
Methods inherited from class net.sourceforge.jwebunit.junit.WebTestCase
assertButtonNotPresent, assertButtonNotPresentWithText, assertButtonPresent, assertButtonPresentWithText, assertCheckboxNotPresent, assertCheckboxNotPresent, assertCheckboxNotSelected, assertCheckboxNotSelected, assertCheckboxPresent, assertCheckboxPresent, assertCheckboxSelected, assertCheckboxSelected, assertCookiePresent, assertCookieValueEquals, assertCookieValueMatch, assertDownloadedFileEquals, assertElementNotPresent, assertElementNotPresentByXPath, assertElementPresent, assertElementPresentByXPath, assertFormElementEmpty, assertFormElementEquals, assertFormElementMatch, assertFormElementNotPresent, assertFormElementPresent, assertFormNotPresent, assertFormNotPresent, assertFormPresent, assertFormPresent, assertFramePresent, assertHiddenFieldPresent, assertImagePresent, assertImageValid, assertImageValidAndStore, assertKeyInTable, assertKeyInTable, assertKeyNotInTable, assertKeyNotPresent, assertKeyNotPresent, assertKeyPresent, assertKeyPresent, assertKeysInTable, assertKeysInTable, assertLinkNotPresent, assertLinkNotPresentWithExactText, assertLinkNotPresentWithExactText, assertLinkNotPresentWithImage, assertLinkNotPresentWithText, assertLinkNotPresentWithText, assertLinkPresent, assertLinkPresentWithExactText, assertLinkPresentWithExactText, assertLinkPresentWithImage, assertLinkPresentWithText, assertLinkPresentWithText, assertMatch, assertMatchInElement, assertMatchInTable, assertMatchInTable, assertNoMatch, assertNoMatchInElement, assertNoMatchInTable, assertNoMatchInTable, assertRadioOptionNotPresent, assertRadioOptionNotSelected, assertRadioOptionPresent, assertRadioOptionSelected, assertResetButtonNotPresent, assertResetButtonNotPresent, assertResetButtonPresent, assertResetButtonPresent, assertSelectedOptionEquals, assertSelectedOptionMatches, assertSelectedOptionsEqual, assertSelectedOptionsMatch, assertSelectedOptionValueEquals, assertSelectedOptionValuesEqual, assertSelectOptionNotPresent, assertSelectOptionPresent, assertSelectOptionsEqual, assertSelectOptionsNotEqual, assertSelectOptionsPresent, assertSelectOptionValueNotPresent, assertSelectOptionValuePresent, assertSelectOptionValuesEqual, assertSelectOptionValuesNotEqual, assertSelectOptionValuesPresent, assertSubmitButtonNotPresent, assertSubmitButtonNotPresent, assertSubmitButtonPresent, assertSubmitButtonPresent, assertSubmitButtonPresent, assertTableEquals, assertTableEquals, assertTableMatch, assertTableMatch, assertTableNotPresent, assertTablePresent, assertTableRowCountEquals, assertTableRowsEqual, assertTableRowsEqual, assertTableRowsMatch, assertTableRowsMatch, assertTextFieldEquals, assertTextInElement, assertTextInTable, assertTextInTable, assertTextNotInElement, assertTextNotInTable, assertTextNotInTable, assertTextNotPresent, assertTextPresent, assertTitleEquals, assertTitleEqualsKey, assertTitleEqualsKey, assertTitleMatch, assertWindowCountEquals, assertWindowPresent, assertWindowPresent, assertWindowPresentWithTitle, beginAt, checkCheckbox, checkCheckbox, clickButton, clickButtonWithText, clickElementByXPath, clickLink, clickLinkWithExactText, clickLinkWithExactText, clickLinkWithImage, clickLinkWithText, clickLinkWithText, clickRadioOption, closeBrowser, closeWindow, dumpCookies, dumpHtml, dumpHtml, dumpTable, dumpTable, getDialog, getElementAttributByXPath, getElementTextByXPath, getFormElementValue, getImage, getMessage, getMessage, getPageSource, getServeurResponse, getTable, getTestContext, getTester, getTestingEngineKey, gotoFrame, gotoPage, gotoRootWindow, gotoWindow, gotoWindow, gotoWindowByTitle, reset, runBare, saveAs, selectOption, selectOptionByValue, selectOptions, selectOptionsByValues, setDialog, setExpectedJavaScriptAlert, setExpectedJavaScriptAlert, setExpectedJavaScriptConfirm, setExpectedJavaScriptConfirm, setExpectedJavaScriptPrompt, setExpectedJavaScriptPrompt, setFormElement, setScriptingEnabled, setTestContext, setTestingEngineKey, setTextField, setWorkingForm, setWorkingForm, setWorkingForm, submit, submit, submit, uncheckCheckbox, uncheckCheckbox
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rpc

protected ConfluenceRpc rpc

rootResource

protected com.sun.jersey.api.client.WebResource rootResource

adminRootResource

protected com.sun.jersey.api.client.WebResource adminRootResource

client

protected com.sun.jersey.api.client.Client client

baseUrl

protected String baseUrl

loginHelper

protected LoginHelper loginHelper

serverStateManager

protected ServerStateManager serverStateManager

userHelper

protected UserManagementHelper userHelper

testData

protected TestData testData
Constructor Detail

AbstractRestAcceptanceTest

public AbstractRestAcceptanceTest()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class net.sourceforge.jwebunit.junit.WebTestCase
Throws:
Exception

expand

protected com.sun.jersey.api.client.WebResource expand(com.sun.jersey.api.client.WebResource webResource,
                                                       String... values)

expandWithIndexes

protected com.sun.jersey.api.client.WebResource expandWithIndexes(com.sun.jersey.api.client.WebResource webResource,
                                                                  String value,
                                                                  int start,
                                                                  int end)

getRootResource

protected com.sun.jersey.api.client.WebResource getRootResource(User user)

getResource

protected com.sun.jersey.api.client.WebResource getResource(URI uri,
                                                            User user)

doGet

protected JSONObject doGet(com.sun.jersey.api.client.WebResource resource)
                    throws JSONException
Throws:
JSONException

doGet

protected <T> T doGet(com.sun.jersey.api.client.WebResource resource,
                      Class<T> entityClass)

doGet

protected <T> T doGet(com.sun.jersey.api.client.WebResource resource,
                      Class<T> entityClass,
                      String requestType)

doPut

protected <T> T doPut(com.sun.jersey.api.client.WebResource resource,
                      T entity)

doPost

protected URI doPost(com.sun.jersey.api.client.WebResource resource,
                     Object entity)

getContentWithId

protected ContentEntity getContentWithId(List<ContentEntity> entities,
                                         String id)

assertLink

protected void assertLink(String rel,
                          String href,
                          com.atlassian.plugins.rest.common.Link link)


Copyright © 2003-2012 Atlassian. All Rights Reserved.