1 42 43 package org.jfree.junit; 44 45 import java.awt.BasicStroke ; 46 import java.awt.Stroke ; 47 48 import junit.framework.Test; 49 import junit.framework.TestCase; 50 import junit.framework.TestSuite; 51 52 55 public class StrokeTests extends TestCase { 56 57 62 public static Test suite() { 63 return new TestSuite(StrokeTests.class); 64 } 65 66 71 public StrokeTests(final String name) { 72 super(name); 73 } 74 75 78 public void testBasicStrokeEquals() { 79 final Stroke s1 = new BasicStroke (1.5f); 80 final Stroke s2 = new BasicStroke (1.5f); 81 assertEquals(s1, s2); 82 } 83 84 87 public void testColorHashcode() { 88 final Stroke s1 = new BasicStroke (1.5f); 89 final Stroke s2 = new BasicStroke (1.5f); 90 assertTrue(s1.equals(s2)); 91 final int h1 = s1.hashCode(); 92 final int h2 = s2.hashCode(); 93 assertEquals(h1, h2); 94 } 95 96 } 97 | Popular Tags |