001: /*
002: * This file is part of "SnipSnap Radeox Rendering Engine".
003: *
004: * Copyright (c) 2002 Stephan J. Schmidt, Matthias L. Jugel
005: * All Rights Reserved.
006: *
007: * Please visit http://radeox.org/ for updates and contact.
008: *
009: * --LICENSE NOTICE--
010: * Licensed under the Apache License, Version 2.0 (the "License");
011: * you may not use this file except in compliance with the License.
012: * You may obtain a copy of the License at
013: *
014: * http://www.apache.org/licenses/LICENSE-2.0
015: *
016: * Unless required by applicable law or agreed to in writing, software
017: * distributed under the License is distributed on an "AS IS" BASIS,
018: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
019: * See the License for the specific language governing permissions and
020: * limitations under the License.
021: * --LICENSE NOTICE--
022: */
023: package org.radeox.test.macro.list;
024:
025: import junit.framework.Test;
026: import junit.framework.TestSuite;
027:
028: import org.radeox.macro.list.AtoZListFormatter;
029:
030: public class AtoZListFormatterTest extends ListFormatterSupport {
031: public AtoZListFormatterTest(String name) {
032: super (name);
033: }
034:
035: public static Test suite() {
036: return new TestSuite(AtoZListFormatterTest.class);
037: }
038:
039: protected void setUp() throws Exception {
040: super .setUp();
041: formatter = new AtoZListFormatter();
042: }
043:
044: public void testSingeItem() {
045: // Collection c = Arrays.asList(new String[]{"test"});
046: // try {
047: // formatter.format(writer, emptyLinkable, "", c, "", false);
048: // } catch (IOException e) {
049: // e.printStackTrace();
050: // }
051: // assertEquals("Single item is rendered",
052: // "<table width=\"100%\" class=\"index-top\" cellpadding=\"0\"
053: // cellspacing=\"0\" border=" +
054: // "\"0\"><tr><th><b> <a
055: // href=\"#idxA\">A</a></b></th><th>...</th><th>0 </th><th><b>
056: // <a href=\"#idxB\">B</a></b></th><th>...</th><th>0
057: // </th><th><b> <a h" +
058: // "ref=\"#idxC\">C</a></b></th><th>...</th><th>0 </th><th><b>
059: // <a href=\"#idxD\">D</a></b></th><th>...</th><th>0
060: // </th><th><b> <a href=\"#idxE\">E</a></b></th>" +
061: // "<th>...</th><th>0 </th><th><b> <a
062: // href=\"#idxF\">F</a></b></th><th>...</th><th>0
063: // </th></tr><tr><th><b> <a
064: // href=\"#idxG\">G</a></b></th><th>...</th><th>0" +
065: // " </th><th><b> <a
066: // href=\"#idxH\">H</a></b></th><th>...</th><th>0 </th><th><b>
067: // <a href=\"#idxI\">I</a></b></th><th>...</th><th>0
068: // </th><th><b> " +
069: // "<a href=\"#idxJ\">J</a></b></th><th>...</th><th>0 </th><th><b>
070: // <a href=\"#idxK\">K</a></b></th><th>...</th><th>0
071: // </th><th><b> <a href=\"#idxL\">L</a></b><" +
072: // "/th><th>...</th><th>0 </th></tr><tr><th><b> <a
073: // href=\"#idxM\">M</a></b></th><th>...</th><th>0 </th><th><b>
074: // <a href=\"#idxN\">N</a></b></th><th>...</th><" +
075: // "th>0 </th><th><b> <a
076: // href=\"#idxO\">O</a></b></th><th>...</th><th>0 </th><th><b>
077: // <a href=\"#idxP\">P</a></b></th><th>...</th><th>0
078: // </th><th><b> &n" +
079: // "bsp;<a href=\"#idxQ\">Q</a></b></th><th>...</th><th>0
080: // </th><th><b> <a
081: // href=\"#idxR\">R</a></b></th><th>...</th><th>0
082: // </th></tr><tr><th><b> <a href=\"#idx" +
083: // "S\">S</a></b></th><th>...</th><th>0 </th><th><b> <a
084: // href=\"#idxT\">T</a></b></th><th>...</th><th>1 </th><th><b>
085: // <a href=\"#idxU\">U</a></b></th><th>...</" +
086: // "th><th>0 </th><th><b> <a
087: // href=\"#idxV\">V</a></b></th><th>...</th><th>0 </th><th><b>
088: // <a href=\"#idxW\">W</a></b></th><th>...</th><th>0
089: // </th><th><b" +
090: // "> <a href=\"#idxX\">X</a></b></th><th>...</th><th>0
091: // </th></tr><tr><th><b> <a
092: // href=\"#idxY\">Y</a></b></th><th>...</th><th>0 </th><th><b>
093: // <a href=\"" +
094: // "#idxZ\">Z</a></b></th><th>...</th><th>0 </th><th><b> <a
095: // href=\"#idx0-9\">0-9</a></b></th><th>...</th><th>0 </th><th><b>
096: // <a href=\"#idxAT\">@</a></b></th>" +
097: // "<th>...</th><th>0
098: // </th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th></tr></table><div
099: // class=\"list-title\"></div><table width=\"100%\" class=\"i" +
100: // "ndex\" cellpadding=\"0\" cellspacing=\"0\"
101: // border=\"0\"><tr><th><b><a name=\"idxA\"></a>A</b></th><th>
102: // </th><th><b><a name=\"idxA\"></a>B</b></th></tr><tr><th><b><a
103: // name=\"idxC\"></a>C<" +
104: // "/b></th><th> </th><th><b><a
105: // name=\"idxC\"></a>D</b></th></tr><tr><th><b><a
106: // name=\"idxE\"></a>E</b></th><th> </th><th><b><a
107: // name=\"idxE\"></a>F</b></th></tr><tr><th><b><a name=\"id" +
108: // "xG\"></a>G</b></th><th> </th><th><b><a
109: // name=\"idxG\"></a>H</b></th></tr><tr><th><b><a
110: // name=\"idxI\"></a>I</b></th><th> </th><th><b><a
111: // name=\"idxI\"></a>J</b></th></tr><tr><th><b><" +
112: // "a name=\"idxK\"></a>K</b></th><th> </th><th><b><a
113: // name=\"idxK\"></a>L</b></th></tr><tr><th><b><a
114: // name=\"idxM\"></a>M</b></th><th> </th><th><b><a
115: // name=\"idxM\"></a>N</b></th></tr><t" +
116: // "r><th><b><a name=\"idxO\"></a>O</b></th><th> </th><th><b><a
117: // name=\"idxO\"></a>P</b></th></tr><tr><th><b><a
118: // name=\"idxQ\"></a>Q</b></th><th> </th><th><b><a
119: // name=\"idxQ\"></a>R</b></" +
120: // "th></tr><tr><th><b><a name=\"idxS\"></a>S</b></th><th>
121: // </th><th><b><a name=\"idxS\"></a>T</b></th></tr><tr><td></td><td>
122: // </td><td>test</td></tr><tr><th><b><a name=\"idxU\"></a>U<" +
123: // "/b></th><th> </th><th><b><a
124: // name=\"idxU\"></a>V</b></th></tr><tr><th><b><a
125: // name=\"idxW\"></a>W</b></th><th> </th><th><b><a
126: // name=\"idxW\"></a>X</b></th></tr><tr><th><b><a name=\"id" +
127: // "xY\"></a>Y</b></th><th> </th><th><b><a
128: // name=\"idxY\"></a>Z</b></th></tr><tr><th><b><a
129: // name=\"idx0-9\"></a>0-9</b></th><th> </th><th><b><a
130: // name=\"idx0-9\"></a>@</b></th></tr></table>",
131: // writer.toString());
132: }
133: }
|