public abstract class AbstractRemoteServiceAcceptanceTest extends AbstractAcceptanceTest
Modifier and Type | Field and Description |
---|---|
protected ProxyCreator |
proxyCreator |
rpc, testHelper, testName
Constructor and Description |
---|
AbstractRemoteServiceAcceptanceTest() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkPageResponse(String pageIdentifier,
int expectedPageSize,
int expectedUniqueResultsAfter,
int actualUniqueResultsAfter,
PageResponse<?> pageResponse)
Method used to do some basic assumptions on PageResponse objects
|
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 |
initialize() |
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.
|
commonSetUp, exceptionSupplier
protected ProxyCreator proxyCreator
protected abstract Object getService()
protected abstract Class getServiceClass()
public void testServiceProxy() throws Exception
Exception
protected 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)
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
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 User userByNumber(int number)
number
- protected Space spaceByNumber(int number)
number
- protected void prepareSpacesAndUsersWithCascadedVisibility(int amount)
amount
- - amount of user-spaces requiredprotected void prepareMspacesWithNpages(int spacesAmount, int contentPagesPerEachSpace)
prepareSpacesAndUsersWithCascadedVisibility(int)
spacesAmount
- how many spaces neededcontentPagesPerEachSpace
- how many pages should each space containCopyright © 2003–2016 Atlassian. All rights reserved.