1 29 30 package nextapp.echo2.app.test.componentxml; 31 32 import java.io.InputStream ; 33 34 import junit.framework.TestCase; 35 36 import nextapp.echo2.app.Button; 37 import nextapp.echo2.app.Label; 38 import nextapp.echo2.app.Style; 39 import nextapp.echo2.app.StyleSheet; 40 import nextapp.echo2.app.componentxml.StyleSheetLoader; 41 42 45 public class BooleanPeerTest extends TestCase { 46 47 private StyleSheet styleSheet; 48 49 52 public void setUp() 53 throws Exception { 54 InputStream in = IntegerPeerTest.class.getResourceAsStream("BooleanPeerTest.stylesheet"); 55 styleSheet = StyleSheetLoader.load(in, StyleSheetLoaderTest.class.getClassLoader()); 56 in.close(); 57 } 58 59 62 public void testBasic() { 63 Style charlieStyle = styleSheet.getStyle(Label.class, "charlie"); 64 assertEquals(Boolean.FALSE, charlieStyle.getProperty("lineWrap")); 65 Style deltaStyle = styleSheet.getStyle(Button.class, "delta"); 66 assertEquals(Boolean.TRUE, deltaStyle.getProperty("lineWrap")); 67 } 68 } 69 | Popular Tags |