com.atlassian.crowd.acceptance.rest
Interface RestServer


public interface RestServer

This interface represents a server which offers a Crowd REST service.

Tests retrieve RestServer instance by calling com.atlassian.crowd.acceptance.tests.rest.RestServerImpl.INSTANCE


Method Summary
 void after()
          This method is called after each test is run, and it should free resources.
 void before()
          This method is called before each test is run, and it should reset the server in a predictable state.
 com.sun.jersey.api.client.Client decorateClient(com.sun.jersey.api.client.Client client)
          Perform custom processing on the Jersey client, such as adding any necessary headers for multitenant tests.
 URL getBaseUrl()
           
 

Method Detail

before

void before()
            throws Exception
This method is called before each test is run, and it should reset the server in a predictable state.

Throws:
Exception - if the server could not be restored

after

void after()
This method is called after each test is run, and it should free resources.


getBaseUrl

URL getBaseUrl()
Returns:
the base URL of the application hosting the REST plugin.

decorateClient

com.sun.jersey.api.client.Client decorateClient(com.sun.jersey.api.client.Client client)
Perform custom processing on the Jersey client, such as adding any necessary headers for multitenant tests.

Parameters:
client - The client to decorate
Returns:
The decorated client


Copyright © 2014 Atlassian. All Rights Reserved.