Exemplo n.º 1
0
 @Test
 public void testInstanciation() throws Exception {
   AreaParameters ap = new AreaParameters(Color.BLUE, .25, 42.0, "2", Color.YELLOW, .46);
   assertTrue(ap.getFillColor().equals(Color.YELLOW));
   assertTrue(ap.getFillOpacity() - .46 < EPS);
   assertTrue(ap.getLineDash().equals("2"));
   assertTrue(ap.getLineColor().equals(Color.BLUE));
   assertTrue(ap.getLineOpacity() - .25 < EPS);
   assertTrue(ap.getLineWidth() - 42.0 < EPS);
 }
Exemplo n.º 2
0
 @Test
 public void testDefaultValue() throws Exception {
   AreaParameters ap = new AreaParameters();
   assertTrue(
       ap.getFillColor()
           .equals(
               new Color((int) SolidFill.GRAY50, (int) SolidFill.GRAY50, (int) SolidFill.GRAY50)));
   assertTrue(ap.getFillOpacity() - 1 < EPS);
   assertTrue(ap.getLineDash().isEmpty());
   assertTrue(ap.getLineColor().equals(Color.BLACK));
   assertTrue(ap.getLineOpacity() - 1 < EPS);
   assertTrue(ap.getLineWidth() - .25 < EPS);
 }