01: package de.java2html.options.test;
02:
03: import junit.framework.TestCase;
04: import de.java2html.options.JavaSourceStyleEntry;
05: import de.java2html.util.HtmlUtilities;
06: import de.java2html.util.RGB;
07:
08: /**
09: * @author Markus Gebhard
10: */
11: public class JavaSourceStyleEntryTest extends TestCase {
12: private JavaSourceStyleEntry entry;
13:
14: protected void setUp() throws Exception {
15: entry = new JavaSourceStyleEntry(RGB.RED, true, false);
16: }
17:
18: public void testCreate() {
19: assertEquals(RGB.RED, entry.getColor());
20: assertTrue(entry.isBold());
21: assertFalse(entry.isItalic());
22: }
23:
24: /** @deprecated As of Dec 21, 2003 (Markus Gebhard) */
25: public void testCloneEquals() {
26: assertEquals(entry, entry.getClone());
27: }
28:
29: public void testSameEquals() {
30: assertEquals(entry, entry);
31: }
32:
33: public void testDifferentNotEquals() {
34: JavaSourceStyleEntry other = new JavaSourceStyleEntry(
35: RGB.GREEN, true, false);
36: assertFalse(other.equals(entry));
37: }
38:
39: public void testGetHtmlColor() {
40: assertEquals(HtmlUtilities.toHTML(RGB.RED), entry
41: .getHtmlColor());
42: }
43: }
|