Class HttpTest

  • All Implemented Interfaces:
    junit.framework.Test

    public class HttpTest
    extends HttpTestBase
    Helper class for HTTP tests, extends HttpTestBase and adds a few utilities that we commonly use in our integration tests. Meant to be used as a helper class in JUnit4-style tests, as we gradually move away from JUnit3 style.
    • Field Detail

      • scriptPath

        protected String scriptPath
      • testText

        protected String testText
      • displayUrl

        protected String displayUrl
    • Constructor Detail

      • HttpTest

        public HttpTest()
    • Method Detail

      • assertContains

        public static void assertContains​(String content,
                                          String expected)
      • assertNotContains

        public static void assertNotContains​(String content,
                                             String notExpected)
      • setScriptPath

        public void setScriptPath​(String scriptPath)
      • getScriptPath

        public String getScriptPath()
      • getHttpClient

        public org.apache.commons.httpclient.HttpClient getHttpClient()
      • setUp

        public void setUp()
                   throws Exception
        Making this public here, changing the base class to public is not convenient as many derived classes override it as protected.
        Overrides:
        setUp in class HttpTestBase
        Throws:
        Exception
      • tearDown

        public void tearDown()
                      throws Exception
        Making this public here, changing the base class to public is not convenient as many derived classes override it as protected.
        Overrides:
        tearDown in class HttpTestBase
        Throws:
        Exception