001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: /**
018: * @author Alexey A. Ivanov
019: * @version $Revision$
020: */package javax.swing.text.html;
021:
022: import javax.swing.text.html.HTML.Attribute;
023:
024: import junit.framework.TestCase;
025:
026: public class HTML_AttributeTest extends TestCase {
027: private Attribute attr;
028:
029: public void testACTION() {
030: attr = HTML.Attribute.ACTION;
031: assertEquals("action", attr.toString());
032: }
033:
034: public void testALIGN() {
035: attr = HTML.Attribute.ALIGN;
036: assertEquals("align", attr.toString());
037: }
038:
039: public void testALINK() {
040: attr = HTML.Attribute.ALINK;
041: assertEquals("alink", attr.toString());
042: }
043:
044: public void testALT() {
045: attr = HTML.Attribute.ALT;
046: assertEquals("alt", attr.toString());
047: }
048:
049: public void testARCHIVE() {
050: attr = HTML.Attribute.ARCHIVE;
051: assertEquals("archive", attr.toString());
052: }
053:
054: public void testBACKGROUND() {
055: attr = HTML.Attribute.BACKGROUND;
056: assertEquals("background", attr.toString());
057: }
058:
059: public void testBGCOLOR() {
060: attr = HTML.Attribute.BGCOLOR;
061: assertEquals("bgcolor", attr.toString());
062: }
063:
064: public void testBORDER() {
065: attr = HTML.Attribute.BORDER;
066: assertEquals("border", attr.toString());
067: }
068:
069: public void testCELLPADDING() {
070: attr = HTML.Attribute.CELLPADDING;
071: assertEquals("cellpadding", attr.toString());
072: }
073:
074: public void testCELLSPACING() {
075: attr = HTML.Attribute.CELLSPACING;
076: assertEquals("cellspacing", attr.toString());
077: }
078:
079: public void testCHECKED() {
080: attr = HTML.Attribute.CHECKED;
081: assertEquals("checked", attr.toString());
082: }
083:
084: public void testCLASS() {
085: attr = HTML.Attribute.CLASS;
086: assertEquals("class", attr.toString());
087: }
088:
089: public void testCLASSID() {
090: attr = HTML.Attribute.CLASSID;
091: assertEquals("classid", attr.toString());
092: }
093:
094: public void testCLEAR() {
095: attr = HTML.Attribute.CLEAR;
096: assertEquals("clear", attr.toString());
097: }
098:
099: public void testCODE() {
100: attr = HTML.Attribute.CODE;
101: assertEquals("code", attr.toString());
102: }
103:
104: public void testCODEBASE() {
105: attr = HTML.Attribute.CODEBASE;
106: assertEquals("codebase", attr.toString());
107: }
108:
109: public void testCODETYPE() {
110: attr = HTML.Attribute.CODETYPE;
111: assertEquals("codetype", attr.toString());
112: }
113:
114: public void testCOLOR() {
115: attr = HTML.Attribute.COLOR;
116: assertEquals("color", attr.toString());
117: }
118:
119: public void testCOLS() {
120: attr = HTML.Attribute.COLS;
121: assertEquals("cols", attr.toString());
122: }
123:
124: public void testCOLSPAN() {
125: attr = HTML.Attribute.COLSPAN;
126: assertEquals("colspan", attr.toString());
127: }
128:
129: public void testCOMMENT() {
130: attr = HTML.Attribute.COMMENT;
131: assertEquals("comment", attr.toString());
132: }
133:
134: public void testCOMPACT() {
135: attr = HTML.Attribute.COMPACT;
136: assertEquals("compact", attr.toString());
137: }
138:
139: public void testCONTENT() {
140: attr = HTML.Attribute.CONTENT;
141: assertEquals("content", attr.toString());
142: }
143:
144: public void testCOORDS() {
145: attr = HTML.Attribute.COORDS;
146: assertEquals("coords", attr.toString());
147: }
148:
149: public void testDATA() {
150: attr = HTML.Attribute.DATA;
151: assertEquals("data", attr.toString());
152: }
153:
154: public void testDECLARE() {
155: attr = HTML.Attribute.DECLARE;
156: assertEquals("declare", attr.toString());
157: }
158:
159: public void testDIR() {
160: attr = HTML.Attribute.DIR;
161: assertEquals("dir", attr.toString());
162: }
163:
164: public void testDUMMY() {
165: attr = HTML.Attribute.DUMMY;
166: assertEquals("dummy", attr.toString());
167: }
168:
169: public void testENCTYPE() {
170: attr = HTML.Attribute.ENCTYPE;
171: assertEquals("enctype", attr.toString());
172: }
173:
174: public void testENDTAG() {
175: attr = HTML.Attribute.ENDTAG;
176: assertEquals("endtag", attr.toString());
177: }
178:
179: public void testFACE() {
180: attr = HTML.Attribute.FACE;
181: assertEquals("face", attr.toString());
182: }
183:
184: public void testFRAMEBORDER() {
185: attr = HTML.Attribute.FRAMEBORDER;
186: assertEquals("frameborder", attr.toString());
187: }
188:
189: public void testHALIGN() {
190: attr = HTML.Attribute.HALIGN;
191: assertEquals("halign", attr.toString());
192: }
193:
194: public void testHEIGHT() {
195: attr = HTML.Attribute.HEIGHT;
196: assertEquals("height", attr.toString());
197: }
198:
199: public void testHREF() {
200: attr = HTML.Attribute.HREF;
201: assertEquals("href", attr.toString());
202: }
203:
204: public void testHSPACE() {
205: attr = HTML.Attribute.HSPACE;
206: assertEquals("hspace", attr.toString());
207: }
208:
209: public void testHTTPEQUIV() {
210: attr = HTML.Attribute.HTTPEQUIV;
211: assertEquals("http-equiv", attr.toString());
212: }
213:
214: public void testID() {
215: attr = HTML.Attribute.ID;
216: assertEquals("id", attr.toString());
217: }
218:
219: public void testISMAP() {
220: attr = HTML.Attribute.ISMAP;
221: assertEquals("ismap", attr.toString());
222: }
223:
224: public void testLANG() {
225: attr = HTML.Attribute.LANG;
226: assertEquals("lang", attr.toString());
227: }
228:
229: public void testLANGUAGE() {
230: attr = HTML.Attribute.LANGUAGE;
231: assertEquals("language", attr.toString());
232: }
233:
234: public void testLINK() {
235: attr = HTML.Attribute.LINK;
236: assertEquals("link", attr.toString());
237: }
238:
239: public void testLOWSRC() {
240: attr = HTML.Attribute.LOWSRC;
241: assertEquals("lowsrc", attr.toString());
242: }
243:
244: public void testMARGINHEIGHT() {
245: attr = HTML.Attribute.MARGINHEIGHT;
246: assertEquals("marginheight", attr.toString());
247: }
248:
249: public void testMARGINWIDTH() {
250: attr = HTML.Attribute.MARGINWIDTH;
251: assertEquals("marginwidth", attr.toString());
252: }
253:
254: public void testMAXLENGTH() {
255: attr = HTML.Attribute.MAXLENGTH;
256: assertEquals("maxlength", attr.toString());
257: }
258:
259: public void testMETHOD() {
260: attr = HTML.Attribute.METHOD;
261: assertEquals("method", attr.toString());
262: }
263:
264: public void testMULTIPLE() {
265: attr = HTML.Attribute.MULTIPLE;
266: assertEquals("multiple", attr.toString());
267: }
268:
269: public void testN() {
270: attr = HTML.Attribute.N;
271: assertEquals("n", attr.toString());
272: }
273:
274: public void testNAME() {
275: attr = HTML.Attribute.NAME;
276: assertEquals("name", attr.toString());
277: }
278:
279: public void testNOHREF() {
280: attr = HTML.Attribute.NOHREF;
281: assertEquals("nohref", attr.toString());
282: }
283:
284: public void testNORESIZE() {
285: attr = HTML.Attribute.NORESIZE;
286: assertEquals("noresize", attr.toString());
287: }
288:
289: public void testNOSHADE() {
290: attr = HTML.Attribute.NOSHADE;
291: assertEquals("noshade", attr.toString());
292: }
293:
294: public void testNOWRAP() {
295: attr = HTML.Attribute.NOWRAP;
296: assertEquals("nowrap", attr.toString());
297: }
298:
299: public void testPROMPT() {
300: attr = HTML.Attribute.PROMPT;
301: assertEquals("prompt", attr.toString());
302: }
303:
304: public void testREL() {
305: attr = HTML.Attribute.REL;
306: assertEquals("rel", attr.toString());
307: }
308:
309: public void testREV() {
310: attr = HTML.Attribute.REV;
311: assertEquals("rev", attr.toString());
312: }
313:
314: public void testROWS() {
315: attr = HTML.Attribute.ROWS;
316: assertEquals("rows", attr.toString());
317: }
318:
319: public void testROWSPAN() {
320: attr = HTML.Attribute.ROWSPAN;
321: assertEquals("rowspan", attr.toString());
322: }
323:
324: public void testSCROLLING() {
325: attr = HTML.Attribute.SCROLLING;
326: assertEquals("scrolling", attr.toString());
327: }
328:
329: public void testSELECTED() {
330: attr = HTML.Attribute.SELECTED;
331: assertEquals("selected", attr.toString());
332: }
333:
334: public void testSHAPE() {
335: attr = HTML.Attribute.SHAPE;
336: assertEquals("shape", attr.toString());
337: }
338:
339: public void testSHAPES() {
340: attr = HTML.Attribute.SHAPES;
341: assertEquals("shapes", attr.toString());
342: }
343:
344: public void testSIZE() {
345: attr = HTML.Attribute.SIZE;
346: assertEquals("size", attr.toString());
347: }
348:
349: public void testSRC() {
350: attr = HTML.Attribute.SRC;
351: assertEquals("src", attr.toString());
352: }
353:
354: public void testSTANDBY() {
355: attr = HTML.Attribute.STANDBY;
356: assertEquals("standby", attr.toString());
357: }
358:
359: public void testSTART() {
360: attr = HTML.Attribute.START;
361: assertEquals("start", attr.toString());
362: }
363:
364: public void testSTYLE() {
365: attr = HTML.Attribute.STYLE;
366: assertEquals("style", attr.toString());
367: }
368:
369: public void testTARGET() {
370: attr = HTML.Attribute.TARGET;
371: assertEquals("target", attr.toString());
372: }
373:
374: public void testTEXT() {
375: attr = HTML.Attribute.TEXT;
376: assertEquals("text", attr.toString());
377: }
378:
379: public void testTITLE() {
380: attr = HTML.Attribute.TITLE;
381: assertEquals("title", attr.toString());
382: }
383:
384: public void testTYPE() {
385: attr = HTML.Attribute.TYPE;
386: assertEquals("type", attr.toString());
387: }
388:
389: public void testUSEMAP() {
390: attr = HTML.Attribute.USEMAP;
391: assertEquals("usemap", attr.toString());
392: }
393:
394: public void testVALIGN() {
395: attr = HTML.Attribute.VALIGN;
396: assertEquals("valign", attr.toString());
397: }
398:
399: public void testVALUE() {
400: attr = HTML.Attribute.VALUE;
401: assertEquals("value", attr.toString());
402: }
403:
404: public void testVALUETYPE() {
405: attr = HTML.Attribute.VALUETYPE;
406: assertEquals("valuetype", attr.toString());
407: }
408:
409: public void testVERSION() {
410: attr = HTML.Attribute.VERSION;
411: assertEquals("version", attr.toString());
412: }
413:
414: public void testVLINK() {
415: attr = HTML.Attribute.VLINK;
416: assertEquals("vlink", attr.toString());
417: }
418:
419: public void testVSPACE() {
420: attr = HTML.Attribute.VSPACE;
421: assertEquals("vspace", attr.toString());
422: }
423:
424: public void testWIDTH() {
425: attr = HTML.Attribute.WIDTH;
426: assertEquals("width", attr.toString());
427: }
428: }
|