Class TestUtils


  • public class TestUtils
    extends Object
    Utility functions for the integration tests
    Since:
    2015-04-21
    Author:
    acoburn
    • Method Detail

      • getEvent

        public static String getEvent​(String subject,
                                      String eventType)
        Get an event for a given URL
        Parameters:
        subject - the URL
        eventType - 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 URL
        content - string containing data
        mimeType - 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