1 29 30 package nextapp.echo2.app.test; 31 32 import nextapp.echo2.app.Extent; 33 import nextapp.echo2.app.FillImage; 34 import nextapp.echo2.app.ResourceImageReference; 35 import junit.framework.TestCase; 36 37 41 public class FillImageTest extends TestCase { 42 43 private static final ResourceImageReference image1 = new ResourceImageReference("image1.png", "image/png", 44 new Extent(50), new Extent(40)); 45 private static final ResourceImageReference image1Copy = new ResourceImageReference("image1.png", "image/png", 46 new Extent(50), new Extent(40)); 47 private static final ResourceImageReference image2 = new ResourceImageReference("image2.png", "image/png", 48 new Extent(50), new Extent(40)); 49 private static final FillImage fillImage1 = new FillImage(image1, new Extent(5), new Extent(3, Extent.PX), 50 FillImage.REPEAT_HORIZONTAL); 51 private static final FillImage fillImage1Copy = new FillImage(image1Copy, new Extent(5), new Extent(3, Extent.PX), 52 FillImage.REPEAT_HORIZONTAL); 53 private static final FillImage fillImage2 = new FillImage(image2, new Extent(5), new Extent(3, Extent.PX), 54 FillImage.REPEAT_HORIZONTAL); 55 56 59 public void testEquals() { 60 assertTrue(fillImage1.equals(fillImage1Copy)); 61 assertFalse(fillImage1.equals(fillImage2)); 62 assertFalse(fillImage1.equals(null)); 63 } 64 } 65 | Popular Tags |