1 29 30 package nextapp.echo2.app.test; 31 32 import nextapp.echo2.app.Extent; 33 import nextapp.echo2.app.HttpImageReference; 34 import junit.framework.TestCase; 35 36 40 public class HttpImageReferenceTest extends TestCase { 41 42 private static final HttpImageReference image1 = new HttpImageReference("http://www.nextapp.com/home/images/logo.png", 43 new Extent(50), new Extent(40)); 44 private static final HttpImageReference image1Copy = new HttpImageReference("http://www.nextapp.com/home/images/logo.png", 45 new Extent(50), new Extent(40)); 46 private static final HttpImageReference image2 = 47 new HttpImageReference("http://www.nextapp.com/home/images/nav_contact_rollover.png", 48 new Extent(50), new Extent(40)); 49 50 53 public void testEquals() { 54 assertTrue(image1.equals(image1Copy)); 55 assertFalse(image1.equals(image2)); 56 assertFalse(image1.equals(new Object ())); 57 assertFalse(image1.equals(null)); 58 } 59 } 60 | Popular Tags |