Exemplo n.º 1
0
 @Test
 public void testToDefaultString() {
   QxColor color = QxColor.valueOf("0, 0, 0, 0.5");
   QxShadow shadow = QxShadow.create(false, 10, 10, 0, 0, color);
   String expected = "10px 10px 0px 0px rgba( 0, 0, 0, 0.5 )";
   assertEquals(expected, shadow.toDefaultString());
 }
Exemplo n.º 2
0
 @Test
 public void testCreate_WithOpacity() {
   QxColor color = QxColor.valueOf("0, 0, 0, 0.5");
   QxShadow shadow = QxShadow.create(false, 10, 10, 0, 0, color);
   assertNotNull(shadow);
   assertFalse(shadow.inset);
   assertEquals(10, shadow.offsetX);
   assertEquals(10, shadow.offsetY);
   assertEquals(0, shadow.blur);
   assertEquals(0, shadow.spread);
   assertEquals(QxColor.BLACK.toDefaultString(), shadow.color);
   assertEquals(0.5, shadow.opacity, 0);
 }