Class TestUtils
- java.lang.Object
-
- org.fcrepo.camel.httpforwarding.integration.TestUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.fcrepo.client.FcrepoClientcreateClient()Create a new FcrepoClient instance with authentication.static StringgetEvent(String subject, String eventType)Get an event for a given URLstatic voidhttpPost(String url, String content, String mimeType)Post data to the provided URL
-
-
-
Method Detail
-
getEvent
public static String getEvent(String subject, String eventType)
Get an event for a given URL- Parameters:
subject- the URLeventType- the event type- Returns:
- the event message as JSON
-
httpPost
public static void httpPost(String url, String content, String mimeType) throws Exception
Post data to the provided URL- Parameters:
url- string containing URLcontent- string containing datamimeType- string containing MIMe type of content- Throws:
Exception- in the event of an HTTP client failure
-
createClient
public static org.fcrepo.client.FcrepoClient createClient()
Create a new FcrepoClient instance with authentication.- Returns:
- the newly created client
-
-