1 4 package org.columba.core.gui.util; 5 6 import java.awt.Color ; 7 8 import junit.framework.TestCase; 9 10 import org.columba.core.gui.base.ColorFactory; 11 12 13 16 public class ColorFactoryTest extends TestCase { 17 20 public void testGetColor() { 21 ColorFactory.clear(); 22 23 Color col1 = ColorFactory.getColor(0); 24 assertNotNull("The factory returned a null object", col1); 25 26 Color col2 = ColorFactory.getColor(1); 27 assertNotNull("The factory returned a null object", col2); 28 assertNotSame("The factory returned the same object for different values", 29 col1, col2); 30 31 Color col1again = ColorFactory.getColor(0); 32 assertNotNull("The factory returned a null object", col1again); 33 assertSame("The factory did not return the same object for a value", 34 col1, col1again); 35 } 36 } 37 | Popular Tags |