Ejemplo n.º 1
0
 @Test
 public void testFromUniqueSymbolArea() throws Exception {
   AreaParameters ap = new AreaParameters(Color.BLUE, .25, 42.0, "2", Color.CYAN, .46);
   AreaParameters ap2 = new AreaParameters(Color.BLUE, .25, 42.0, "2", Color.CYAN, .46);
   UniqueSymbolArea usa = new UniqueSymbolArea(ap);
   assertTrue(ap2.equals(usa.getAreaParameters()));
 }
Ejemplo n.º 2
0
 @Test
 public void testEquality() throws Exception {
   AreaParameters ap = new AreaParameters(Color.BLUE, .25, 42.0, "2", Color.YELLOW, .46);
   AreaParameters ap2 = new AreaParameters(Color.BLUE, .25, 42.0, "2", Color.YELLOW, .46);
   assertTrue(ap.equals(ap2));
   assertFalse(ap.equals("ahoi"));
 }
Ejemplo n.º 3
0
 @Test
 public void testNullInput() throws Exception {
   AreaParameters ap = new AreaParameters(Color.BLUE, .25, 42.0, "2", null, .46);
   assertTrue(
       ap.getFillColor()
           .equals(new Color(SolidFill.GRAY50_INT, SolidFill.GRAY50_INT, SolidFill.GRAY50_INT)));
   ap = new AreaParameters(Color.BLUE, .25, 42.0, "2", Color.YELLOW, null);
   assertTrue(ap.getFillOpacity() - 1.0 < EPS);
 }
Ejemplo n.º 4
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);
 }
Ejemplo n.º 5
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);
 }