com.atlassian.crowd.acceptance.rest
Interface RestServer

All Known Implementing Classes:
RestServerImpl

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.
 String getContextPath()
          Returns the context path of the server.
 String getHost()
          Returns the host name of the server.
 int getPort()
          Returns the port of the server.
 void intendToModifyData()
           
 

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.


intendToModifyData

void intendToModifyData()

getHost

String getHost()
Returns the host name of the server.

Returns:
host name of the server

getPort

int getPort()
Returns the port of the server.

Returns:
port of the server

getContextPath

String getContextPath()
Returns the context path of the server.

Returns:
context path of the server

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 © 2012 Atlassian. All Rights Reserved.