1 package de.java2html.options.test; 2 3 import junit.framework.TestCase; 4 import de.java2html.options.JavaSourceStyleEntry; 5 import de.java2html.util.HtmlUtilities; 6 import de.java2html.util.RGB; 7 8 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 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(RGB.GREEN, true, false); 35 assertFalse(other.equals(entry)); 36 } 37 38 public void testGetHtmlColor() { 39 assertEquals(HtmlUtilities.toHTML(RGB.RED), entry.getHtmlColor()); 40 } 41 } | Popular Tags |