1 29 30 package nextapp.echo2.app.test; 31 32 import nextapp.echo2.app.FillImage; 33 import junit.framework.TestCase; 34 35 39 public class BackgroundImageTest extends TestCase { 40 41 44 public void testConstructorSimple() { 45 FillImage backgroundImage = new FillImage(TestConstants.ICON); 46 assertEquals(TestConstants.ICON, backgroundImage.getImage()); 47 assertEquals(null, backgroundImage.getHorizontalOffset()); 48 assertEquals(null, backgroundImage.getVerticalOffset()); 49 assertEquals(FillImage.REPEAT, backgroundImage.getRepeat()); 50 } 51 52 55 public void testConstructorFullFeature() { 56 FillImage backgroundImage = new FillImage(TestConstants.ICON, TestConstants.EXTENT_30_PX, 57 TestConstants.EXTENT_50_PERCENT, FillImage.REPEAT_HORIZONTAL); 58 assertEquals(TestConstants.ICON, backgroundImage.getImage()); 59 assertEquals(TestConstants.EXTENT_30_PX, backgroundImage.getHorizontalOffset()); 60 assertEquals(TestConstants.EXTENT_50_PERCENT, backgroundImage.getVerticalOffset()); 61 assertEquals(FillImage.REPEAT_HORIZONTAL, backgroundImage.getRepeat()); 62 } 63 } 64 | Popular Tags |