|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.api.AbstractAcceptanceTest
com.atlassian.confluence.api.AbstractRemoteServiceAcceptanceTest
public abstract class AbstractRemoteServiceAcceptanceTest
Provides common acceptance tests for RemoteServices.
| Field Summary | |
|---|---|
protected ProxyCreator |
proxyCreator
|
| Fields inherited from class com.atlassian.confluence.api.AbstractAcceptanceTest |
|---|
rpc, testHelper, testName |
| Constructor Summary | |
|---|---|
AbstractRemoteServiceAcceptanceTest()
|
|
| Method Summary | |
|---|---|
protected void |
checkPageResponse(String pageIdentifier,
int expectedPageSize,
int expectedUniqueResultsAfter,
int actualUniqueResultsAfter,
PageResponse<?> pageResponse)
Method used to do some basic assumptions on PageResponse objects Assertions here: * page response is of expected size * page response contains unique results * page response does not add non-unique results to the previous pages |
protected Collection<String> |
getExcludedMethodNamesForProxyTest()
Returns a collection of method names to skip the proxy test for. |
protected abstract Object |
getService()
|
protected abstract Class |
getServiceClass()
|
protected void |
loginIfNotAlready(User user)
Checks whether currently logged in user is same as a user passed as an argument. |
protected void |
prepareMspacesWithNpages(int spacesAmount,
int contentPagesPerEachSpace)
Method creates cascaded setup of users and spaces see prepareSpacesAndUsersWithCascadedVisibility(int) |
protected void |
prepareSpacesAndUsersWithCascadedVisibility(int amount)
Creates a set of users + set of spaces so that: * each user is an admin in the space with corresponding name * each user can see all the previous spaces + his own 1 1<-2 1<-2<-3 |
void |
proxySetUp()
|
protected Space |
spaceByNumber(int number)
Creates a space with name like "space |
void |
testServiceProxy()
Test that RemoteService equivalents for API Service interfaces include all of the methods on the Services. |
protected User |
userByNumber(int number)
Generated or gets arbitrary number of test users. |
| 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 |
|---|
protected ProxyCreator proxyCreator
| Constructor Detail |
|---|
public AbstractRemoteServiceAcceptanceTest()
| Method Detail |
|---|
public final void proxySetUp()
throws Exception
Exceptionprotected abstract Object getService()
protected abstract Class getServiceClass()
public void testServiceProxy()
throws Exception
Exceptionprotected Collection<String> getExcludedMethodNamesForProxyTest()
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.
protected void checkPageResponse(String pageIdentifier,
int expectedPageSize,
int expectedUniqueResultsAfter,
int actualUniqueResultsAfter,
PageResponse<?> pageResponse)
pageIdentifier - - String which describes a paged request. Used for logging. I.e. "page 1 of user 1"expectedPageSize - - Expected size of a pageexpectedUniqueResultsAfter - - Expected count of all the unique results retrieved via this and previous pagesactualUniqueResultsAfter - - Actual count of all the unique results retrieved via this and previous pagespageResponse - - Actual PageResponse entityprotected void loginIfNotAlready(User user)
user - protected User userByNumber(int number)
number -
protected Space spaceByNumber(int number)
number -
protected void prepareSpacesAndUsersWithCascadedVisibility(int amount)
amount - - amount of user-spaces required
protected void prepareMspacesWithNpages(int spacesAmount,
int contentPagesPerEachSpace)
prepareSpacesAndUsersWithCascadedVisibility(int)
spacesAmount - how many spaces neededcontentPagesPerEachSpace - how many pages should each space contain
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||