Example #1
0
 @Test
 public void testConstructor() throws Throwable {
   WikiLink wikiLink = new WikiLink("/wiki", "en", null);
   assertNull("wikiLink.getQuery()", wikiLink.getQuery());
   assertNull("wikiLink.getSection()", wikiLink.getSection());
   assertNull("wikiLink.getText()", wikiLink.getText());
   assertNull("wikiLink.getArticle()", wikiLink.getArticle());
   assertEquals(
       "wikiLink.getNamespace()", Namespace.namespace(Namespace.MAIN_ID), wikiLink.getNamespace());
   assertNull("wikiLink.getDestination()", wikiLink.getDestination());
   assertFalse("wikiLink.getColon()", wikiLink.getColon());
 }
Example #2
0
 @Test
 public void testSetQuery() throws Throwable {
   WikiLink wikiLink = new WikiLink("/wiki", "en", null);
   wikiLink.setQuery("testWikiLinkQuery");
   assertEquals("wikiLink.getQuery()", "testWikiLinkQuery", wikiLink.getQuery());
 }