public ElementStyle opacity(int opacity) { setOpacity(opacity); return this; }
@Test public void test_setOpacity() { ElementStyle style = new ElementStyle(); assertNull(style.getOpacity()); style.setOpacity(-1); assertEquals(0, style.getOpacity().intValue()); style.setOpacity(0); assertEquals(0, style.getOpacity().intValue()); style.setOpacity(50); assertEquals(50, style.getOpacity().intValue()); style.setOpacity(100); assertEquals(100, style.getOpacity().intValue()); style.setOpacity(101); assertEquals(100, style.getOpacity().intValue()); }