001: /**
002: * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, version 2.1, dated February 1999.
003: *
004: * This program is free software; you can redistribute it and/or modify
005: * it under the terms of the latest version of the GNU Lesser General
006: * Public License as published by the Free Software Foundation;
007: *
008: * This program is distributed in the hope that it will be useful,
009: * but WITHOUT ANY WARRANTY; without even the implied warranty of
010: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
011: * GNU Lesser General Public License for more details.
012: *
013: * You should have received a copy of the GNU Lesser General Public License
014: * along with this program (LICENSE.txt); if not, write to the Free Software
015: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
016: *
017: * Based on code generated by Agitar build: Agitator Version 1.0.2.000071 (Build date: Jan 12, 2007) [1.0.2.000071]
018: */package org.jamwiki.utils;
019:
020: import junit.framework.TestCase;
021:
022: /**
023: *
024: */
025: public class WikiLinkTest extends TestCase {
026:
027: /**
028: *
029: */
030: public void testConstructor() throws Throwable {
031: WikiLink wikiLink = new WikiLink();
032: assertNull("wikiLink.getQuery()", wikiLink.getQuery());
033: assertNull("wikiLink.getSection()", wikiLink.getSection());
034: assertNull("wikiLink.getText()", wikiLink.getText());
035: assertNull("wikiLink.getArticle()", wikiLink.getArticle());
036: assertNull("wikiLink.getNamespace()", wikiLink.getNamespace());
037: assertNull("wikiLink.getDestination()", wikiLink
038: .getDestination());
039: assertFalse("wikiLink.getColon()", wikiLink.getColon());
040: }
041:
042: /**
043: *
044: */
045: public void testSetArticle() throws Throwable {
046: WikiLink wikiLink = new WikiLink();
047: wikiLink.setArticle("testWikiLinkArticle");
048: assertEquals("wikiLink.getArticle()", "testWikiLinkArticle",
049: wikiLink.getArticle());
050: }
051:
052: /**
053: *
054: */
055: public void testSetColon() throws Throwable {
056: WikiLink wikiLink = new WikiLink();
057: wikiLink.setColon(true);
058: assertTrue("wikiLink.getColon()", wikiLink.getColon());
059: }
060:
061: /**
062: *
063: */
064: public void testSetDestination() throws Throwable {
065: WikiLink wikiLink = new WikiLink();
066: wikiLink.setDestination("testWikiLinkDestination");
067: assertEquals("wikiLink.getDestination()",
068: "testWikiLinkDestination", wikiLink.getDestination());
069: }
070:
071: /**
072: *
073: */
074: public void testSetNamespace() throws Throwable {
075: WikiLink wikiLink = new WikiLink();
076: wikiLink.setNamespace("testWikiLinkNamespace");
077: assertEquals("wikiLink.getNamespace()",
078: "testWikiLinkNamespace", wikiLink.getNamespace());
079: }
080:
081: /**
082: *
083: */
084: public void testSetQuery() throws Throwable {
085: WikiLink wikiLink = new WikiLink();
086: wikiLink.setQuery("testWikiLinkQuery");
087: assertEquals("wikiLink.getQuery()", "testWikiLinkQuery",
088: wikiLink.getQuery());
089: }
090:
091: /**
092: *
093: */
094: public void testSetSection() throws Throwable {
095: WikiLink wikiLink = new WikiLink();
096: wikiLink.setSection("testWikiLinkSection");
097: assertEquals("wikiLink.getSection()", "testWikiLinkSection",
098: wikiLink.getSection());
099: }
100:
101: /**
102: *
103: */
104: public void testSetText() throws Throwable {
105: WikiLink wikiLink = new WikiLink();
106: wikiLink.setText("testWikiLinkText");
107: assertEquals("wikiLink.getText()", "testWikiLinkText", wikiLink
108: .getText());
109: }
110: }
|