1 17 18 19 20 package org.apache.fop.traits; 21 22 import java.awt.Color ; 23 24 import junit.framework.TestCase; 25 26 import org.apache.fop.fo.Constants; 27 import org.apache.fop.util.ColorUtil; 28 29 32 public class BorderPropsTestCase extends TestCase { 33 34 38 public void testSerialization() throws Exception { 39 Color col = new Color (1.0f, 1.0f, 0.5f, 1.0f); 40 col = ColorUtil.parseColorString(null, ColorUtil.colorToString(col)); 42 43 BorderProps b1 = new BorderProps(Constants.EN_DOUBLE, 1250, 44 col, BorderProps.COLLAPSE_OUTER); 45 String ser = b1.toString(); 46 BorderProps b2 = BorderProps.valueOf(null, ser); 47 assertEquals(b1, b2); 48 49 b1 = new BorderProps(Constants.EN_INSET, 9999, 50 col, BorderProps.SEPARATE); 51 ser = b1.toString(); 52 b2 = BorderProps.valueOf(null, ser); 53 assertEquals(b1, b2); 54 } 55 56 } 57 | Popular Tags |