Class WikimediaPageFetcherTest

java.lang.Object
org.getalp.wiktionary.WikimediaPageFetcherTest

public class WikimediaPageFetcherTest extends Object
Exercises WikimediaPageFetcher against a local stub HTTP server so that tests never reach the real Wikimedia API.
  • Constructor Details

    • WikimediaPageFetcherTest

      public WikimediaPageFetcherTest()
  • Method Details

    • stopServer

      public void stopServer()
    • fetchesExistingPageAsWrappedXml

      public void fetchesExistingPageAsWrappedXml() throws IOException
      Throws:
      IOException
    • returnsNullForMissingPage

      public void returnsNullForMissingPage() throws IOException
      Throws:
      IOException
    • escapesXmlSensitiveCharactersInContent

      public void escapesXmlSensitiveCharactersInContent() throws IOException
      Throws:
      IOException
    • throwsIOExceptionWhenServerIsUnreachable

      public void throwsIOExceptionWhenServerIsUnreachable() throws IOException
      Throws:
      IOException