harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r479418 [2/43] - in /harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common: javax/swing/ javax/swing/border/ javax/swing/colorchooser/ javax/swing/event/ javax/swing/filechooser/ javax/swing/plaf/ javax/swing/plaf/basic/ ja...
Date Sun, 26 Nov 2006 20:15:55 GMT
Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/BevelBorderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/BevelBorderTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/BevelBorderTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/BevelBorderTest.java Sun Nov 26 12:15:43 2006
@@ -24,13 +24,11 @@
 
 import java.awt.Color;
 import java.awt.Insets;
-
 import javax.swing.JComponent;
 import javax.swing.JPanel;
 import javax.swing.SwingTestCase;
 
 public class BevelBorderTest extends SwingTestCase {
-
     public static void main(final String[] args) {
         junit.textui.TestRunner.run(BevelBorderTest.class);
     }
@@ -42,19 +40,20 @@
         int bevelType = BevelBorder.LOWERED;
         Color highlightColor = null;
         Color shadowColor = null;
-
         BevelBorder border = new BevelBorder(bevelType);
-        assertEquals("highlightOuterColor coinsides", highlightColor, border.getHighlightOuterColor());
-        assertEquals("highlightInnerColor coinsides", highlightColor, border.getHighlightInnerColor());
+        assertEquals("highlightOuterColor coinsides", highlightColor, border
+                .getHighlightOuterColor());
+        assertEquals("highlightInnerColor coinsides", highlightColor, border
+                .getHighlightInnerColor());
         assertEquals("shadowOuterColor coinsides", shadowColor, border.getShadowOuterColor());
         assertEquals("shadowInnerColor coinsides", shadowColor, border.getShadowInnerColor());
         assertEquals("Bevel type coinsides", bevelType, border.getBevelType());
-
         bevelType = BevelBorder.RAISED;
-
         border = new BevelBorder(bevelType);
-        assertEquals("highlightOuterColor coinsides", highlightColor, border.getHighlightOuterColor());
-        assertEquals("highlightInnerColor coinsides", highlightColor, border.getHighlightInnerColor());
+        assertEquals("highlightOuterColor coinsides", highlightColor, border
+                .getHighlightOuterColor());
+        assertEquals("highlightInnerColor coinsides", highlightColor, border
+                .getHighlightInnerColor());
         assertEquals("shadowOuterColor coinsides", shadowColor, border.getShadowOuterColor());
         assertEquals("shadowInnerColor coinsides", shadowColor, border.getShadowInnerColor());
         assertEquals("Bevel type coinsides", bevelType, border.getBevelType());
@@ -67,21 +66,22 @@
         int bevelType = BevelBorder.LOWERED;
         Color highlightColor = Color.RED;
         Color shadowColor = Color.GREEN;
-
         BevelBorder border = new BevelBorder(bevelType, highlightColor, shadowColor);
-        assertEquals("highlightOuterColor coinsides", highlightColor, border.getHighlightOuterColor());
-        assertEquals("highlightInnerColor coinsides", highlightColor, border.getHighlightInnerColor());
+        assertEquals("highlightOuterColor coinsides", highlightColor, border
+                .getHighlightOuterColor());
+        assertEquals("highlightInnerColor coinsides", highlightColor, border
+                .getHighlightInnerColor());
         assertEquals("shadowOuterColor coinsides", shadowColor, border.getShadowOuterColor());
         assertEquals("shadowInnerColor coinsides", shadowColor, border.getShadowInnerColor());
         assertEquals("Bevel type coinsides", bevelType, border.getBevelType());
-
         bevelType = BevelBorder.RAISED;
         highlightColor = Color.YELLOW;
         shadowColor = Color.WHITE;
-
         border = new BevelBorder(bevelType, highlightColor, shadowColor);
-        assertEquals("highlightOuterColor coinsides", highlightColor, border.getHighlightOuterColor());
-        assertEquals("highlightInnerColor coinsides", highlightColor, border.getHighlightInnerColor());
+        assertEquals("highlightOuterColor coinsides", highlightColor, border
+                .getHighlightOuterColor());
+        assertEquals("highlightInnerColor coinsides", highlightColor, border
+                .getHighlightInnerColor());
         assertEquals("shadowOuterColor coinsides", shadowColor, border.getShadowOuterColor());
         assertEquals("shadowInnerColor coinsides", shadowColor, border.getShadowInnerColor());
         assertEquals("Bevel type coinsides", bevelType, border.getBevelType());
@@ -96,25 +96,32 @@
         Color highlightInnerColor = Color.YELLOW;
         Color shadowOuterColor = Color.GREEN;
         Color shadowInnerColor = Color.BLACK;
-
-        BevelBorder border = new BevelBorder(bevelType, highlightOuterColor, highlightInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("highlightOuterColor coinsides", highlightOuterColor, border.getHighlightOuterColor());
-        assertEquals("highlightInnerColor coinsides", highlightInnerColor, border.getHighlightInnerColor());
-        assertEquals("shadowOuterColor coinsides", shadowOuterColor, border.getShadowOuterColor());
-        assertEquals("shadowInnerColor coinsides", shadowInnerColor, border.getShadowInnerColor());
+        BevelBorder border = new BevelBorder(bevelType, highlightOuterColor,
+                highlightInnerColor, shadowOuterColor, shadowInnerColor);
+        assertEquals("highlightOuterColor coinsides", highlightOuterColor, border
+                .getHighlightOuterColor());
+        assertEquals("highlightInnerColor coinsides", highlightInnerColor, border
+                .getHighlightInnerColor());
+        assertEquals("shadowOuterColor coinsides", shadowOuterColor, border
+                .getShadowOuterColor());
+        assertEquals("shadowInnerColor coinsides", shadowInnerColor, border
+                .getShadowInnerColor());
         assertEquals("Bevel type coinsides", bevelType, border.getBevelType());
-
         bevelType = BevelBorder.RAISED;
         highlightOuterColor = Color.YELLOW;
         highlightInnerColor = Color.RED;
         shadowOuterColor = Color.WHITE;
         shadowInnerColor = Color.BLUE;
-
-        border = new BevelBorder(bevelType, highlightOuterColor, highlightInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("highlightOuterColor coinsides", highlightOuterColor, border.getHighlightOuterColor());
-        assertEquals("highlightInnerColor coinsides", highlightInnerColor, border.getHighlightInnerColor());
-        assertEquals("shadowOuterColor coinsides", shadowOuterColor, border.getShadowOuterColor());
-        assertEquals("shadowInnerColor coinsides", shadowInnerColor, border.getShadowInnerColor());
+        border = new BevelBorder(bevelType, highlightOuterColor, highlightInnerColor,
+                shadowOuterColor, shadowInnerColor);
+        assertEquals("highlightOuterColor coinsides", highlightOuterColor, border
+                .getHighlightOuterColor());
+        assertEquals("highlightInnerColor coinsides", highlightInnerColor, border
+                .getHighlightInnerColor());
+        assertEquals("shadowOuterColor coinsides", shadowOuterColor, border
+                .getShadowOuterColor());
+        assertEquals("shadowInnerColor coinsides", shadowInnerColor, border
+                .getShadowInnerColor());
         assertEquals("Bevel type coinsides", bevelType, border.getBevelType());
     }
 
@@ -128,25 +135,20 @@
         BevelBorder border = new BevelBorder(BevelBorder.RAISED, Color.black, Color.white);
         Insets insets = new Insets(1, 1, 1, 1);
         JPanel panel = new JPanel();
-
         border.getBorderInsets(panel, insets);
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
         assertEquals("insets values coinside", thickness1, insets.bottom);
-
         panel.setBorder(new LineBorder(Color.black, thickness2));
         border.getBorderInsets(panel, insets);
-
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
         assertEquals("insets values coinside", thickness1, insets.bottom);
-
         insets = new Insets(thickness3, thickness3, thickness3, thickness3);
         panel.setBorder(new BevelBorder(BevelBorder.LOWERED));
         Insets newInsets = border.getBorderInsets(panel, insets);
-
         assertEquals("insets values coinside", thickness1, newInsets.top);
         assertEquals("insets values coinside", thickness1, newInsets.left);
         assertEquals("insets values coinside", thickness1, newInsets.right);
@@ -167,25 +169,20 @@
         BevelBorder border = new BevelBorder(BevelBorder.RAISED, Color.black, Color.white);
         Insets insets = new Insets(1, 1, 1, 1);
         JPanel panel = new JPanel();
-
         insets = border.getBorderInsets(null);
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
         assertEquals("insets values coinside", thickness1, insets.bottom);
-
         panel.setBorder(new LineBorder(Color.black, thickness2));
         insets = border.getBorderInsets(panel);
-
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
         assertEquals("insets values coinside", thickness1, insets.bottom);
-
         insets = new Insets(thickness3, thickness3, thickness3, thickness3);
         panel.setBorder(new BevelBorder(BevelBorder.LOWERED));
         insets = border.getBorderInsets(panel);
-
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
@@ -205,53 +202,51 @@
     }
 
     public void testPaintBorder() {
-//      JPanel panel1 = new JPanel();
-//      JPanel panel2 = new JPanel();
-//      JPanel panel3 = new JPanel();
-//
-//      Color shadowInnerColor = Color.GREEN;
-//      Color shadowOuterColor = Color.BLACK;
-//      Color highlightedInnerColor = Color.RED;
-//      Color highlightedOuterColor = Color.BLUE;
-//
-//      BevelBorder border1 = new BevelBorder(EtchedBorder.LOWERED, highlightedOuterColor, highlightedInnerColor,
-//                                                                  shadowOuterColor, shadowInnerColor);
-//      BevelBorder border2 = new BevelBorder(EtchedBorder.RAISED, highlightedOuterColor, highlightedInnerColor,
-//                                                                  shadowOuterColor, shadowInnerColor);
-//      panel2.setBorder(border1);
-//      panel3.setBorder(border2);
-//      panel2.setPreferredSize(new Dimension(200, 150));
-//      panel3.setPreferredSize(new Dimension(200, 150));
-//
-//      panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));
-//      panel1.add(panel2);
-//      panel1.add(panel3);
-//
-//      JFrame frame = new JFrame();
-//      frame.getContentPane().add(panel1);
-//      frame.pack();
-//      frame.show();
-//      while(!frame.isActive());
-//      while(frame.isActive());
+        //      JPanel panel1 = new JPanel();
+        //      JPanel panel2 = new JPanel();
+        //      JPanel panel3 = new JPanel();
+        //
+        //      Color shadowInnerColor = Color.GREEN;
+        //      Color shadowOuterColor = Color.BLACK;
+        //      Color highlightedInnerColor = Color.RED;
+        //      Color highlightedOuterColor = Color.BLUE;
+        //
+        //      BevelBorder border1 = new BevelBorder(EtchedBorder.LOWERED, highlightedOuterColor, highlightedInnerColor,
+        //                                                                  shadowOuterColor, shadowInnerColor);
+        //      BevelBorder border2 = new BevelBorder(EtchedBorder.RAISED, highlightedOuterColor, highlightedInnerColor,
+        //                                                                  shadowOuterColor, shadowInnerColor);
+        //      panel2.setBorder(border1);
+        //      panel3.setBorder(border2);
+        //      panel2.setPreferredSize(new Dimension(200, 150));
+        //      panel3.setPreferredSize(new Dimension(200, 150));
+        //
+        //      panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));
+        //      panel1.add(panel2);
+        //      panel1.add(panel3);
+        //
+        //      JFrame frame = new JFrame();
+        //      frame.getContentPane().add(panel1);
+        //      frame.pack();
+        //      frame.show();
+        //      while(!frame.isActive());
+        //      while(frame.isActive());
     }
 
     public void testIsBorderOpaque() {
         Color shadowColor = Color.GREEN;
         Color highlightedColor = Color.RED;
-
         BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedColor, shadowColor);
-        assertTrue("BevelBorder is opaque",  border.isBorderOpaque());
-
+        assertTrue("BevelBorder is opaque", border.isBorderOpaque());
         border = new BevelBorder(BevelBorder.RAISED);
-        assertTrue("BevelBorder is opaque",  border.isBorderOpaque());
+        assertTrue("BevelBorder is opaque", border.isBorderOpaque());
     }
 
     /*
      * Class under test for Color getShadowOuterColor(Component)
      */
     public void testGetShadowOuterColorComponent() {
-        JComponent c1 =  new JPanel();
-        JComponent c2 =  new JPanel();
+        JComponent c1 = new JPanel();
+        JComponent c2 = new JPanel();
         c1.setBackground(new Color(110, 110, 110));
         c1.setForeground(new Color(210, 210, 210));
         c2.setBackground(new Color(10, 10, 10));
@@ -260,22 +255,25 @@
         Color shadowOuterColor = Color.CYAN;
         Color highlightedInnerColor = Color.RED;
         Color highlightedOuterColor = Color.YELLOW;
-
-        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor, highlightedInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("Shadow Outer color coinsides",  shadowOuterColor, border.getShadowOuterColor(c1));
-        assertEquals("Shadow Outer color coinsides",  shadowOuterColor, border.getShadowOuterColor(c2));
-
+        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor,
+                highlightedInnerColor, shadowOuterColor, shadowInnerColor);
+        assertEquals("Shadow Outer color coinsides", shadowOuterColor, border
+                .getShadowOuterColor(c1));
+        assertEquals("Shadow Outer color coinsides", shadowOuterColor, border
+                .getShadowOuterColor(c2));
         border = new BevelBorder(BevelBorder.RAISED);
-        assertEquals("Shadow Outer color coinsides",  new Color(53, 53, 53), border.getShadowOuterColor(c1));
-        assertEquals("Shadow Outer color coinsides",  new Color(4, 4, 4), border.getShadowOuterColor(c2));
+        assertEquals("Shadow Outer color coinsides", new Color(53, 53, 53), border
+                .getShadowOuterColor(c1));
+        assertEquals("Shadow Outer color coinsides", new Color(4, 4, 4), border
+                .getShadowOuterColor(c2));
     }
 
     /*
      * Class under test for Color getShadowInnerColor(Component)
      */
     public void testGetShadowInnerColorComponent() {
-        JComponent c1 =  new JPanel();
-        JComponent c2 =  new JPanel();
+        JComponent c1 = new JPanel();
+        JComponent c2 = new JPanel();
         c1.setBackground(new Color(110, 110, 110));
         c1.setForeground(new Color(210, 210, 210));
         c2.setBackground(new Color(10, 10, 10));
@@ -284,22 +282,25 @@
         Color shadowOuterColor = Color.CYAN;
         Color highlightedInnerColor = Color.RED;
         Color highlightedOuterColor = Color.YELLOW;
-
-        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor, highlightedInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("Shadow Inner color coinsides",  shadowInnerColor, border.getShadowInnerColor(c1));
-        assertEquals("Shadow Inner color coinsides",  shadowInnerColor, border.getShadowInnerColor(c2));
-
+        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor,
+                highlightedInnerColor, shadowOuterColor, shadowInnerColor);
+        assertEquals("Shadow Inner color coinsides", shadowInnerColor, border
+                .getShadowInnerColor(c1));
+        assertEquals("Shadow Inner color coinsides", shadowInnerColor, border
+                .getShadowInnerColor(c2));
         border = new BevelBorder(BevelBorder.RAISED);
-        assertEquals("Shadow Inner color coinsides",  new Color(77, 77, 77), border.getShadowInnerColor(c1));
-        assertEquals("Shadow Inner color coinsides",  new Color(7, 7, 7), border.getShadowInnerColor(c2));
+        assertEquals("Shadow Inner color coinsides", new Color(77, 77, 77), border
+                .getShadowInnerColor(c1));
+        assertEquals("Shadow Inner color coinsides", new Color(7, 7, 7), border
+                .getShadowInnerColor(c2));
     }
 
     /*
      * Class under test for Color getHighlightOuterColor(Component)
      */
     public void testGetHighlightOuterColorComponent() {
-        JComponent c1 =  new JPanel();
-        JComponent c2 =  new JPanel();
+        JComponent c1 = new JPanel();
+        JComponent c2 = new JPanel();
         c1.setBackground(new Color(110, 110, 110));
         c1.setForeground(new Color(210, 210, 210));
         c2.setBackground(new Color(10, 10, 10));
@@ -308,22 +309,25 @@
         Color shadowOuterColor = Color.CYAN;
         Color highlightedInnerColor = Color.RED;
         Color highlightedOuterColor = Color.YELLOW;
-
-        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor, highlightedInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("Highlight Outer color coinsides",  highlightedOuterColor, border.getHighlightOuterColor(c1));
-        assertEquals("Highlight Outer color coinsides",  highlightedOuterColor, border.getHighlightOuterColor(c2));
-
+        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor,
+                highlightedInnerColor, shadowOuterColor, shadowInnerColor);
+        assertEquals("Highlight Outer color coinsides", highlightedOuterColor, border
+                .getHighlightOuterColor(c1));
+        assertEquals("Highlight Outer color coinsides", highlightedOuterColor, border
+                .getHighlightOuterColor(c2));
         border = new BevelBorder(BevelBorder.RAISED);
-        assertEquals("Highlight Outer color coinsides",  new Color(224, 224, 224), border.getHighlightOuterColor(c1));
-        assertEquals("Highlight Outer color coinsides",  new Color(20, 20, 20), border.getHighlightOuterColor(c2));
+        assertEquals("Highlight Outer color coinsides", new Color(224, 224, 224), border
+                .getHighlightOuterColor(c1));
+        assertEquals("Highlight Outer color coinsides", new Color(20, 20, 20), border
+                .getHighlightOuterColor(c2));
     }
 
     /*
      * Class under test for Color getHighlightInnerColor(Component)
      */
     public void testGetHighlightInnerColorComponent() {
-        JComponent c1 =  new JPanel();
-        JComponent c2 =  new JPanel();
+        JComponent c1 = new JPanel();
+        JComponent c2 = new JPanel();
         c1.setBackground(new Color(110, 110, 110));
         c1.setForeground(new Color(210, 210, 210));
         c2.setBackground(new Color(10, 10, 10));
@@ -332,14 +336,17 @@
         Color shadowOuterColor = Color.CYAN;
         Color highlightedInnerColor = Color.RED;
         Color highlightedOuterColor = Color.YELLOW;
-
-        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor, highlightedInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("Highlight Inner color coinsides",  highlightedInnerColor, border.getHighlightInnerColor(c1));
-        assertEquals("Highlight Inner color coinsides",  highlightedInnerColor, border.getHighlightInnerColor(c2));
-
+        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor,
+                highlightedInnerColor, shadowOuterColor, shadowInnerColor);
+        assertEquals("Highlight Inner color coinsides", highlightedInnerColor, border
+                .getHighlightInnerColor(c1));
+        assertEquals("Highlight Inner color coinsides", highlightedInnerColor, border
+                .getHighlightInnerColor(c2));
         border = new BevelBorder(BevelBorder.RAISED);
-        assertEquals("Highlight Inner color coinsides",  new Color(157, 157, 157), border.getHighlightInnerColor(c1));
-        assertEquals("Highlight Inner color coinsides",  new Color(14, 14, 14), border.getHighlightInnerColor(c2));
+        assertEquals("Highlight Inner color coinsides", new Color(157, 157, 157), border
+                .getHighlightInnerColor(c1));
+        assertEquals("Highlight Inner color coinsides", new Color(14, 14, 14), border
+                .getHighlightInnerColor(c2));
     }
 
     /*
@@ -350,15 +357,16 @@
         Color shadowOuterColor = Color.CYAN;
         Color highlightedInnerColor = Color.RED;
         Color highlightedOuterColor = Color.GRAY;
-
-        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor, highlightedInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("Shadow Outer color coinsides", shadowOuterColor, border.getShadowOuterColor());
-
+        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor,
+                highlightedInnerColor, shadowOuterColor, shadowInnerColor);
+        assertEquals("Shadow Outer color coinsides", shadowOuterColor, border
+                .getShadowOuterColor());
         shadowOuterColor = Color.GREEN;
         highlightedOuterColor = Color.WHITE;
-
-        border = new BevelBorder(BevelBorder.RAISED, highlightedOuterColor, highlightedInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("Shadow Outer color coinsides", shadowOuterColor, border.getShadowOuterColor());
+        border = new BevelBorder(BevelBorder.RAISED, highlightedOuterColor,
+                highlightedInnerColor, shadowOuterColor, shadowInnerColor);
+        assertEquals("Shadow Outer color coinsides", shadowOuterColor, border
+                .getShadowOuterColor());
     }
 
     /*
@@ -369,15 +377,16 @@
         Color shadowOuterColor = Color.CYAN;
         Color highlightedInnerColor = Color.RED;
         Color highlightedOuterColor = Color.GRAY;
-
-        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor, highlightedInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("Shadow Inner color coinsides", shadowInnerColor, border.getShadowInnerColor());
-
+        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor,
+                highlightedInnerColor, shadowOuterColor, shadowInnerColor);
+        assertEquals("Shadow Inner color coinsides", shadowInnerColor, border
+                .getShadowInnerColor());
         shadowInnerColor = Color.GREEN;
         highlightedInnerColor = Color.WHITE;
-
-        border = new BevelBorder(BevelBorder.RAISED, highlightedOuterColor, highlightedInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("Shadow Inner color coinsides", shadowInnerColor, border.getShadowInnerColor());
+        border = new BevelBorder(BevelBorder.RAISED, highlightedOuterColor,
+                highlightedInnerColor, shadowOuterColor, shadowInnerColor);
+        assertEquals("Shadow Inner color coinsides", shadowInnerColor, border
+                .getShadowInnerColor());
     }
 
     /*
@@ -388,15 +397,16 @@
         Color shadowOuterColor = Color.CYAN;
         Color highlightedInnerColor = Color.RED;
         Color highlightedOuterColor = Color.GRAY;
-
-        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor, highlightedInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("Highlighted Outer color coinsides", highlightedOuterColor, border.getHighlightOuterColor());
-
+        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor,
+                highlightedInnerColor, shadowOuterColor, shadowInnerColor);
+        assertEquals("Highlighted Outer color coinsides", highlightedOuterColor, border
+                .getHighlightOuterColor());
         shadowOuterColor = Color.GREEN;
         highlightedOuterColor = Color.WHITE;
-
-        border = new BevelBorder(BevelBorder.RAISED, highlightedOuterColor, highlightedInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("Highlighted Outer color coinsides", highlightedOuterColor, border.getHighlightOuterColor());
+        border = new BevelBorder(BevelBorder.RAISED, highlightedOuterColor,
+                highlightedInnerColor, shadowOuterColor, shadowInnerColor);
+        assertEquals("Highlighted Outer color coinsides", highlightedOuterColor, border
+                .getHighlightOuterColor());
     }
 
     /*
@@ -407,25 +417,23 @@
         Color shadowOuterColor = Color.CYAN;
         Color highlightedInnerColor = Color.RED;
         Color highlightedOuterColor = Color.GRAY;
-
-        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor, highlightedInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("Highlighted Inner color coinsides", highlightedInnerColor, border.getHighlightInnerColor());
-
+        BevelBorder border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor,
+                highlightedInnerColor, shadowOuterColor, shadowInnerColor);
+        assertEquals("Highlighted Inner color coinsides", highlightedInnerColor, border
+                .getHighlightInnerColor());
         shadowInnerColor = Color.GREEN;
         highlightedInnerColor = Color.WHITE;
-
-        border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor, highlightedInnerColor, shadowOuterColor, shadowInnerColor);
-        assertEquals("Highlighted Inner color coinsides", highlightedInnerColor, border.getHighlightInnerColor());
+        border = new BevelBorder(BevelBorder.LOWERED, highlightedOuterColor,
+                highlightedInnerColor, shadowOuterColor, shadowInnerColor);
+        assertEquals("Highlighted Inner color coinsides", highlightedInnerColor, border
+                .getHighlightInnerColor());
     }
 
     public void testGetBevelType() {
         int bevelType = BevelBorder.LOWERED;
-
         BevelBorder border = new BevelBorder(bevelType);
         assertEquals("Bevel type coinsides", bevelType, border.getBevelType());
-
         bevelType = BevelBorder.RAISED;
-
         border = new BevelBorder(bevelType);
         assertEquals("Etch type coinsides", bevelType, border.getBevelType());
     }
@@ -441,44 +449,33 @@
         Color highlightedOuterColor2 = Color.LIGHT_GRAY;
         int bevelType1 = BevelBorder.LOWERED;
         int bevelType2 = BevelBorder.RAISED;
-        BevelBorder border1 = new BevelBorder(bevelType1, highlightedOuterColor1, highlightedInnerColor1, shadowOuterColor1, shadowInnerColor1);
-        BevelBorder border2 = new BevelBorder(bevelType2, highlightedOuterColor2, highlightedInnerColor2, shadowOuterColor2, shadowInnerColor2);
-
-        BevelBorder resurrectedBorder = (BevelBorder)serializeObject(border1);
+        BevelBorder border1 = new BevelBorder(bevelType1, highlightedOuterColor1,
+                highlightedInnerColor1, shadowOuterColor1, shadowInnerColor1);
+        BevelBorder border2 = new BevelBorder(bevelType2, highlightedOuterColor2,
+                highlightedInnerColor2, shadowOuterColor2, shadowInnerColor2);
+        BevelBorder resurrectedBorder = (BevelBorder) serializeObject(border1);
         assertNotNull(resurrectedBorder);
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getBevelType(),
-                border1.getBevelType());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getShadowInnerColor(),
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getBevelType(), border1
+                .getBevelType());
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getShadowInnerColor(),
                 border1.getShadowInnerColor());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getShadowOuterColor(),
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getShadowOuterColor(),
                 border1.getShadowOuterColor());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getHighlightInnerColor(),
-                border1.getHighlightInnerColor());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getHighlightOuterColor(),
-                border1.getHighlightOuterColor());
-
-
-        resurrectedBorder = (BevelBorder)serializeObject(border2);
+        assertEquals("Deserialized values coinsides", resurrectedBorder
+                .getHighlightInnerColor(), border1.getHighlightInnerColor());
+        assertEquals("Deserialized values coinsides", resurrectedBorder
+                .getHighlightOuterColor(), border1.getHighlightOuterColor());
+        resurrectedBorder = (BevelBorder) serializeObject(border2);
         assertNotNull(resurrectedBorder);
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getBevelType(),
-                border2.getBevelType());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getShadowInnerColor(),
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getBevelType(), border2
+                .getBevelType());
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getShadowInnerColor(),
                 border2.getShadowInnerColor());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getShadowOuterColor(),
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getShadowOuterColor(),
                 border2.getShadowOuterColor());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getHighlightInnerColor(),
-                border2.getHighlightInnerColor());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getHighlightOuterColor(),
-                border2.getHighlightOuterColor());
+        assertEquals("Deserialized values coinsides", resurrectedBorder
+                .getHighlightInnerColor(), border2.getHighlightInnerColor());
+        assertEquals("Deserialized values coinsides", resurrectedBorder
+                .getHighlightOuterColor(), border2.getHighlightOuterColor());
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/CompoundBorderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/CompoundBorderTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/CompoundBorderTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/CompoundBorderTest.java Sun Nov 26 12:15:43 2006
@@ -24,48 +24,36 @@
 
 import java.awt.Color;
 import java.awt.Insets;
-
 import javax.swing.JPanel;
 import javax.swing.SwingTestCase;
 
 public class CompoundBorderTest extends SwingTestCase {
-
-    public static void main(final String[] args) {
-        junit.textui.TestRunner.run(CompoundBorderTest.class);
-    }
-
     /*
      * Class under test for Insets getBorderInsets(Component, Insets)
      */
     public void testGetBorderInsetsComponentInsets() {
         LineBorder border1 = new LineBorder(Color.red, 10, false);
         LineBorder border2 = new LineBorder(Color.red, 3, false);
-
         CompoundBorder border4 = new CompoundBorder(border1, border2);
-
         Insets insets = new Insets(1, 1, 1, 1);
         JPanel panel = new JPanel();
-
         panel.setBorder(new LineBorder(Color.black, 10001));
         border4.getBorderInsets(panel, insets);
-
-        assertEquals("insets values coinside", 13, insets.top);
-        assertEquals("insets values coinside", 13, insets.left);
-        assertEquals("insets values coinside", 13, insets.right);
-        assertEquals("insets values coinside", 13, insets.bottom);
-
+        assertEquals("insets values coincide", 13, insets.top);
+        assertEquals("insets values coincide", 13, insets.left);
+        assertEquals("insets values coincide", 13, insets.right);
+        assertEquals("insets values coincide", 13, insets.bottom);
         insets = new Insets(1001, 1002, 1003, 1004);
         panel.setBorder(new LineBorder(Color.black, 100001));
         Insets newInsets = border4.getBorderInsets(panel, insets);
-
-        assertEquals("insets values coinside", 13, newInsets.top);
-        assertEquals("insets values coinside", 13, newInsets.left);
-        assertEquals("insets values coinside", 13, newInsets.right);
-        assertEquals("insets values coinside", 13, newInsets.bottom);
-        assertEquals("insets values coinside", 13, insets.top);
-        assertEquals("insets values coinside", 13, insets.left);
-        assertEquals("insets values coinside", 13, insets.right);
-        assertEquals("insets values coinside", 13, insets.bottom);
+        assertEquals("insets values coincide", 13, newInsets.top);
+        assertEquals("insets values coincide", 13, newInsets.left);
+        assertEquals("insets values coincide", 13, newInsets.right);
+        assertEquals("insets values coincide", 13, newInsets.bottom);
+        assertEquals("insets values coincide", 13, insets.top);
+        assertEquals("insets values coincide", 13, insets.left);
+        assertEquals("insets values coincide", 13, insets.right);
+        assertEquals("insets values coincide", 13, insets.bottom);
     }
 
     /*
@@ -80,56 +68,54 @@
         CompoundBorder border6 = new CompoundBorder();
         CompoundBorder border7 = new CompoundBorder(border2, null);
         CompoundBorder border8 = new CompoundBorder(null, border3);
-
         Insets insets1 = new Insets(13, 13, 13, 13);
         Insets insets2 = new Insets(104, 105, 106, 107);
         Insets insets3 = new Insets(0, 0, 0, 0);
         Insets insets4 = new Insets(3, 3, 3, 3);
         Insets insets5 = new Insets(101, 102, 103, 104);
-
         JPanel panel = new JPanel();
         panel.setBorder(new EmptyBorder(1000, 1001, 1002, 1003));
-        assertEquals("Insets coinside ", insets1, border4.getBorderInsets(null));
-        assertEquals("Insets coinside ", insets1, border4.getBorderInsets(panel));
-        assertEquals("Insets coinside ", insets2, border5.getBorderInsets(null));
-        assertEquals("Insets coinside ", insets2, border5.getBorderInsets(panel));
-        assertEquals("Insets coinside ", insets3, border6.getBorderInsets(null));
-        assertEquals("Insets coinside ", insets3, border6.getBorderInsets(panel));
-        assertEquals("Insets coinside ", insets4, border7.getBorderInsets(null));
-        assertEquals("Insets coinside ", insets4, border7.getBorderInsets(panel));
-        assertEquals("Insets coinside ", insets5, border8.getBorderInsets(null));
-        assertEquals("Insets coinside ", insets5, border8.getBorderInsets(panel));
+        assertEquals("Insets coincide ", insets1, border4.getBorderInsets(null));
+        assertEquals("Insets coincide ", insets1, border4.getBorderInsets(panel));
+        assertEquals("Insets coincide ", insets2, border5.getBorderInsets(null));
+        assertEquals("Insets coincide ", insets2, border5.getBorderInsets(panel));
+        assertEquals("Insets coincide ", insets3, border6.getBorderInsets(null));
+        assertEquals("Insets coincide ", insets3, border6.getBorderInsets(panel));
+        assertEquals("Insets coincide ", insets4, border7.getBorderInsets(null));
+        assertEquals("Insets coincide ", insets4, border7.getBorderInsets(panel));
+        assertEquals("Insets coincide ", insets5, border8.getBorderInsets(null));
+        assertEquals("Insets coincide ", insets5, border8.getBorderInsets(panel));
     }
 
     public void testPaintBorder() {
-//        JPanel panel1 = new JPanel();
-//        JPanel panel2 = new JPanel();
-//        JPanel panel3 = new JPanel();
-//        JPanel panel4 = new JPanel();
-//
-//        LineBorder border1 = new LineBorder(Color.red, 10, false);
-//        LineBorder border2 = new LineBorder(Color.yellow, 30, true);
-//        CompoundBorder border3 = new CompoundBorder(border1, border2);
-//        CompoundBorder border4 = new CompoundBorder(null, border2);
-//        CompoundBorder border5 = new CompoundBorder(border1, null);
-//        panel2.setBorder(border3);
-//        panel3.setBorder(border4);
-//        panel4.setBorder(border5);
-//        panel2.setPreferredSize(new Dimension(200, 150));
-//        panel3.setPreferredSize(new Dimension(200, 150));
-//        panel4.setPreferredSize(new Dimension(200, 150));
-//
-//        panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));
-//        panel1.add(panel2);
-//        panel1.add(panel3);
-//        panel1.add(panel4);
-//
-//        JFrame frame = new JFrame();
-//        frame.getContentPane().add(panel1);
-//        frame.pack();
-//        frame.show();
-//        while(!frame.isActive());
-//        while(frame.isActive());
+        //        JPanel panel1 = new JPanel();
+        //        JPanel panel2 = new JPanel();
+        //        JPanel panel3 = new JPanel();
+        //        JPanel panel4 = new JPanel();
+        //
+        //        LineBorder border1 = new LineBorder(Color.red, 10, false);
+        //        LineBorder border2 = new LineBorder(Color.yellow, 30, true);
+        //        CompoundBorder border3 = new CompoundBorder(border1, border2);
+        //        CompoundBorder border4 = new CompoundBorder(null, border2);
+        //        CompoundBorder border5 = new CompoundBorder(border1, null);
+        //        panel2.setBorder(border3);
+        //        panel3.setBorder(border4);
+        //        panel4.setBorder(border5);
+        //        panel2.setPreferredSize(new Dimension(200, 150));
+        //        panel3.setPreferredSize(new Dimension(200, 150));
+        //        panel4.setPreferredSize(new Dimension(200, 150));
+        //
+        //        panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));
+        //        panel1.add(panel2);
+        //        panel1.add(panel3);
+        //        panel1.add(panel4);
+        //
+        //        JFrame frame = new JFrame();
+        //        frame.getContentPane().add(panel1);
+        //        frame.pack();
+        //        frame.show();
+        //        while(!frame.isActive());
+        //        while(frame.isActive());
     }
 
     public void testIsBorderOpaque() {
@@ -141,7 +127,6 @@
         CompoundBorder border6 = new CompoundBorder();
         CompoundBorder border7 = new CompoundBorder(border2, null);
         CompoundBorder border8 = new CompoundBorder(null, border3);
-
         assertTrue("This border is opaque", border4.isBorderOpaque());
         assertFalse("This border is not opaque", border5.isBorderOpaque());
         assertTrue("This border is opaque", border6.isBorderOpaque());
@@ -156,11 +141,18 @@
         LineBorder border1 = new LineBorder(Color.red, 33, false);
         LineBorder border2 = new LineBorder(Color.red, 33, true);
         EmptyBorder border3 = new EmptyBorder(1, 1, 1, 1);
-
         CompoundBorder border4 = new CompoundBorder(border1, border2);
+        assertSame(border1, border4.getOutsideBorder());
+        assertSame(border2, border4.getInsideBorder());
         CompoundBorder border5 = new CompoundBorder(border2, border3);
+        assertSame(border2, border5.getOutsideBorder());
+        assertSame(border3, border5.getInsideBorder());
         CompoundBorder border7 = new CompoundBorder(border2, null);
+        assertSame(border2, border7.getOutsideBorder());
+        assertNull(border7.getInsideBorder());
         CompoundBorder border8 = new CompoundBorder(null, border3);
+        assertNull(border8.getOutsideBorder());
+        assertSame(border3, border8.getInsideBorder());
     }
 
     /*
@@ -172,41 +164,36 @@
         assertNull(border.getOutsideBorder());
     }
 
-
     public void testGetOutsideBorder() {
         LineBorder border1 = new LineBorder(Color.red, 33, false);
         LineBorder border2 = new LineBorder(Color.red, 33, true);
         EmptyBorder border3 = new EmptyBorder(1, 1, 1, 1);
-
         CompoundBorder border4 = new CompoundBorder(border1, border2);
         CompoundBorder border5 = new CompoundBorder(border2, border3);
         CompoundBorder border6 = new CompoundBorder();
         CompoundBorder border7 = new CompoundBorder(border2, null);
         CompoundBorder border8 = new CompoundBorder(null, border3);
-
-        assertEquals("Borders coinside", border1, border4.getOutsideBorder());
-        assertEquals("Borders coinside", border2, border5.getOutsideBorder());
-        assertNull("Borders coinside", border6.getOutsideBorder());
-        assertEquals("Borders coinside", border2, border7.getOutsideBorder());
-        assertNull("Borders coinside", border8.getOutsideBorder());
+        assertEquals("Borders coincide", border1, border4.getOutsideBorder());
+        assertEquals("Borders coincide", border2, border5.getOutsideBorder());
+        assertNull("Borders coincide", border6.getOutsideBorder());
+        assertEquals("Borders coincide", border2, border7.getOutsideBorder());
+        assertNull("Borders coincide", border8.getOutsideBorder());
     }
 
     public void testGetInsideBorder() {
         LineBorder border1 = new LineBorder(Color.red, 33, false);
         LineBorder border2 = new LineBorder(Color.red, 33, true);
         EmptyBorder border3 = new EmptyBorder(1, 1, 1, 1);
-
         CompoundBorder border4 = new CompoundBorder(border1, border2);
         CompoundBorder border5 = new CompoundBorder(border2, border3);
         CompoundBorder border6 = new CompoundBorder();
         CompoundBorder border7 = new CompoundBorder(border2, null);
         CompoundBorder border8 = new CompoundBorder(null, border3);
-
-        assertEquals("Borders coinside", border2, border4.getInsideBorder());
-        assertEquals("Borders coinside", border3, border5.getInsideBorder());
-        assertNull("Borders coinside", border6.getInsideBorder());
-        assertNull("Borders coinside", border7.getInsideBorder());
-        assertEquals("Borders coinside", border3, border8.getInsideBorder());
+        assertEquals("Borders coincide", border2, border4.getInsideBorder());
+        assertEquals("Borders coincide", border3, border5.getInsideBorder());
+        assertNull("Borders coincide", border6.getInsideBorder());
+        assertNull("Borders coincide", border7.getInsideBorder());
+        assertEquals("Borders coincide", border3, border8.getInsideBorder());
     }
 
     public void testReadWriteObject() throws Exception {
@@ -214,21 +201,15 @@
         EmptyBorder border2 = new EmptyBorder(1, 1, 1, 1);
         CompoundBorder border3 = new CompoundBorder(border1, border2);
         CompoundBorder border4 = new CompoundBorder();
-
-        CompoundBorder resurrectedBorder = (CompoundBorder)serializeObject(border3);
+        CompoundBorder resurrectedBorder = (CompoundBorder) serializeObject(border3);
         assertNotNull(resurrectedBorder);
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getOutsideBorder().getClass(),
-                border1.getClass());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getInsideBorder().getClass(),
-                border2.getClass());
-
-        resurrectedBorder = (CompoundBorder)serializeObject(border4);
+        assertEquals("Deserialized values coincides", resurrectedBorder.getOutsideBorder()
+                .getClass(), border1.getClass());
+        assertEquals("Deserialized values coincides", resurrectedBorder.getInsideBorder()
+                .getClass(), border2.getClass());
+        resurrectedBorder = (CompoundBorder) serializeObject(border4);
         assertNotNull(resurrectedBorder);
-        assertNull("Deserialized values coinsides",
-                resurrectedBorder.getOutsideBorder());
-        assertNull("Deserialized values coinsides",
-                resurrectedBorder.getInsideBorder());
+        assertNull("Deserialized values coincides", resurrectedBorder.getOutsideBorder());
+        assertNull("Deserialized values coincides", resurrectedBorder.getInsideBorder());
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/EmptyBorderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/EmptyBorderTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/EmptyBorderTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/EmptyBorderTest.java Sun Nov 26 12:15:43 2006
@@ -23,14 +23,12 @@
 package javax.swing.border;
 
 import java.awt.Insets;
-
 import javax.swing.JPanel;
 import javax.swing.SwingTestCase;
 
 public class EmptyBorderTest extends SwingTestCase {
-
     public void testIsBorderOpaque() {
-        EmptyBorder border =  new EmptyBorder(0, 1, 2, 3);
+        EmptyBorder border = new EmptyBorder(0, 1, 2, 3);
         assertFalse("EmptyBorder is not opaque ", border.isBorderOpaque());
     }
 
@@ -43,7 +41,6 @@
         int right = 300;
         int bottom = 400;
         EmptyBorder border = new EmptyBorder(new Insets(top, left, bottom, right));
-
         assertEquals(border.getBorderInsets(), new Insets(top, left, bottom, right));
     }
 
@@ -56,7 +53,6 @@
         int right = 300;
         int bottom = 400;
         EmptyBorder border = new EmptyBorder(top, left, bottom, right);
-
         assertEquals(border.getBorderInsets(), new Insets(top, left, bottom, right));
     }
 
@@ -72,9 +68,9 @@
         int left = 345;
         int right = 345;
         EmptyBorder border = new EmptyBorder(top, left);
-
         assertEquals(border.getBorderInsets(), new Insets(top, left, bottom, right));
     }
+
     /*
      * Class under test for Insets getBorderInsets(Component, Insets)
      */
@@ -86,19 +82,15 @@
         EmptyBorder border = new EmptyBorder(top, left, bottom, right);
         Insets insets = new Insets(1, 1, 1, 1);
         JPanel panel = new JPanel();
-
         panel.setBorder(new EmptyBorder(1, 1, 1, 1));
         border.getBorderInsets(panel, insets);
-
         assertEquals("insets values coinside", top, insets.top);
         assertEquals("insets values coinside", left, insets.left);
         assertEquals("insets values coinside", right, insets.right);
         assertEquals("insets values coinside", bottom, insets.bottom);
-
         insets = new Insets(1, 1, 1, 1);
         panel.setBorder(null);
         Insets newInsets = border.getBorderInsets(panel, insets);
-
         assertEquals("insets values coinside", top, newInsets.top);
         assertEquals("insets values coinside", left, newInsets.left);
         assertEquals("insets values coinside", right, newInsets.right);
@@ -120,18 +112,14 @@
         EmptyBorder border = new EmptyBorder(top, left, bottom, right);
         Insets insets = null;
         JPanel panel = new JPanel();
-
         panel.setBorder(new EmptyBorder(1, 1, 1, 1));
         insets = border.getBorderInsets(panel);
-
         assertEquals("insets values coinside", top, insets.top);
         assertEquals("insets values coinside", left, insets.left);
         assertEquals("insets values coinside", right, insets.right);
         assertEquals("insets values coinside", bottom, insets.bottom);
-
         panel.setBorder(null);
         insets = border.getBorderInsets(panel);
-
         assertEquals("insets values coinside", top, insets.top);
         assertEquals("insets values coinside", left, insets.left);
         assertEquals("insets values coinside", right, insets.right);
@@ -157,7 +145,6 @@
         int bottom = 400;
         EmptyBorder border = new EmptyBorder(top, left, bottom, right);
         Insets insets = border.getBorderInsets();
-
         assertEquals("insets values coinside", top, insets.top);
         assertEquals("insets values coinside", left, insets.left);
         assertEquals("insets values coinside", right, insets.right);
@@ -167,15 +154,13 @@
     public void testReadWriteObject() throws Exception {
         EmptyBorder border1 = new EmptyBorder(10, 20, 30, 40);
         EmptyBorder border2 = new EmptyBorder(40, 50, 60, 70);
-
-        EmptyBorder resurrectedBorder = (EmptyBorder)serializeObject(border1);
+        EmptyBorder resurrectedBorder = (EmptyBorder) serializeObject(border1);
         assertNotNull(resurrectedBorder);
-        assertEquals("Deserialized values coinsides", resurrectedBorder
-                .getBorderInsets(), border1.getBorderInsets());
-
-        resurrectedBorder = (EmptyBorder)serializeObject(border2);
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getBorderInsets(),
+                border1.getBorderInsets());
+        resurrectedBorder = (EmptyBorder) serializeObject(border2);
         assertNotNull(resurrectedBorder);
-        assertEquals("Deserialized values coinsides", resurrectedBorder
-                .getBorderInsets(), border2.getBorderInsets());
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getBorderInsets(),
+                border2.getBorderInsets());
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/EtchedBorderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/EtchedBorderTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/EtchedBorderTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/EtchedBorderTest.java Sun Nov 26 12:15:43 2006
@@ -24,13 +24,11 @@
 
 import java.awt.Color;
 import java.awt.Insets;
-
 import javax.swing.JComponent;
 import javax.swing.JPanel;
 import javax.swing.SwingTestCase;
 
 public class EtchedBorderTest extends SwingTestCase {
-
     public static void main(final String[] args) {
         junit.textui.TestRunner.run(EtchedBorderTest.class);
     }
@@ -42,10 +40,10 @@
         int etchType = EtchedBorder.LOWERED;
         Color shadowColor = null;
         Color highlightedColor = null;
-
         EtchedBorder border = new EtchedBorder();
         assertEquals("Shadow color coinsides", shadowColor, border.getShadowColor());
-        assertEquals("Highlighted color coinsides", highlightedColor, border.getHighlightColor());
+        assertEquals("Highlighted color coinsides", highlightedColor, border
+                .getHighlightColor());
         assertEquals("Etch type coinsides", etchType, border.getEtchType());
     }
 
@@ -56,17 +54,16 @@
         int etchType = EtchedBorder.LOWERED;
         Color shadowColor = null;
         Color highlightedColor = null;
-
         EtchedBorder border = new EtchedBorder(etchType);
         assertEquals("Shadow color coinsides", shadowColor, border.getShadowColor());
-        assertEquals("Highlighted color coinsides", highlightedColor, border.getHighlightColor());
+        assertEquals("Highlighted color coinsides", highlightedColor, border
+                .getHighlightColor());
         assertEquals("Etch type coinsides", etchType, border.getEtchType());
-
         etchType = EtchedBorder.RAISED;
-
         border = new EtchedBorder(etchType);
         assertEquals("Shadow color coinsides", shadowColor, border.getShadowColor());
-        assertEquals("Highlighted color coinsides", highlightedColor, border.getHighlightColor());
+        assertEquals("Highlighted color coinsides", highlightedColor, border
+                .getHighlightColor());
         assertEquals("Etch type coinsides", etchType, border.getEtchType());
     }
 
@@ -77,18 +74,17 @@
         int etchType = EtchedBorder.LOWERED;
         Color shadowColor = Color.YELLOW;
         Color highlightedColor = Color.RED;
-
         EtchedBorder border = new EtchedBorder(highlightedColor, shadowColor);
         assertEquals("Shadow color coinsides", shadowColor, border.getShadowColor());
-        assertEquals("Highlighted color coinsides", highlightedColor, border.getHighlightColor());
+        assertEquals("Highlighted color coinsides", highlightedColor, border
+                .getHighlightColor());
         assertEquals("Etch type coinsides", etchType, border.getEtchType());
-
         shadowColor = Color.GREEN;
         highlightedColor = Color.WHITE;
-
         border = new EtchedBorder(highlightedColor, shadowColor);
         assertEquals("Shadow color coinsides", shadowColor, border.getShadowColor());
-        assertEquals("Highlighted color coinsides", highlightedColor, border.getHighlightColor());
+        assertEquals("Highlighted color coinsides", highlightedColor, border
+                .getHighlightColor());
         assertEquals("Etch type coinsides", etchType, border.getEtchType());
     }
 
@@ -99,19 +95,18 @@
         int etchType = EtchedBorder.LOWERED;
         Color shadowColor = Color.YELLOW;
         Color highlightedColor = Color.RED;
-
         EtchedBorder border = new EtchedBorder(etchType, highlightedColor, shadowColor);
         assertEquals("Shadow color coinsides", shadowColor, border.getShadowColor());
-        assertEquals("Highlighted color coinsides", highlightedColor, border.getHighlightColor());
+        assertEquals("Highlighted color coinsides", highlightedColor, border
+                .getHighlightColor());
         assertEquals("Etch type coinsides", etchType, border.getEtchType());
-
         etchType = EtchedBorder.RAISED;
         shadowColor = Color.GREEN;
         highlightedColor = Color.WHITE;
-
         border = new EtchedBorder(etchType, highlightedColor, shadowColor);
         assertEquals("Shadow color coinsides", shadowColor, border.getShadowColor());
-        assertEquals("Highlighted color coinsides", highlightedColor, border.getHighlightColor());
+        assertEquals("Highlighted color coinsides", highlightedColor, border
+                .getHighlightColor());
         assertEquals("Etch type coinsides", etchType, border.getEtchType());
     }
 
@@ -125,25 +120,20 @@
         EtchedBorder border = new EtchedBorder(Color.black, Color.white);
         Insets insets = new Insets(1, 1, 1, 1);
         JPanel panel = new JPanel();
-
         border.getBorderInsets(panel, insets);
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
         assertEquals("insets values coinside", thickness1, insets.bottom);
-
         panel.setBorder(new LineBorder(Color.black, thickness2));
         border.getBorderInsets(panel, insets);
-
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
         assertEquals("insets values coinside", thickness1, insets.bottom);
-
         insets = new Insets(thickness3, thickness3, thickness3, thickness3);
         panel.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
         Insets newInsets = border.getBorderInsets(panel, insets);
-
         assertEquals("insets values coinside", thickness1, newInsets.top);
         assertEquals("insets values coinside", thickness1, newInsets.left);
         assertEquals("insets values coinside", thickness1, newInsets.right);
@@ -164,25 +154,20 @@
         EtchedBorder border = new EtchedBorder(Color.black, Color.white);
         Insets insets = new Insets(1, 1, 1, 1);
         JPanel panel = new JPanel();
-
         insets = border.getBorderInsets(null);
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
         assertEquals("insets values coinside", thickness1, insets.bottom);
-
         panel.setBorder(new LineBorder(Color.black, thickness2));
         insets = border.getBorderInsets(panel);
-
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
         assertEquals("insets values coinside", thickness1, insets.bottom);
-
         insets = new Insets(thickness3, thickness3, thickness3, thickness3);
         panel.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
         insets = border.getBorderInsets(panel);
-
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
@@ -190,82 +175,80 @@
     }
 
     public void testPaintBorder() {
-//        JPanel panel1 = new JPanel();
-//        JPanel panel2 = new JPanel();
-//        JPanel panel3 = new JPanel();
-//
-//        EtchedBorder border1 = new EtchedBorder(EtchedBorder.LOWERED, Color.red, Color.yellow);
-//        EtchedBorder border2 = new EtchedBorder(EtchedBorder.RAISED, Color.red, Color.yellow);
-//        panel2.setBorder(border1);
-//        panel3.setBorder(border2);
-//        panel2.setPreferredSize(new Dimension(200, 150));
-//        panel3.setPreferredSize(new Dimension(200, 150));
-//
-//        panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));
-//        panel1.add(panel2);
-//        panel1.add(panel3);
-//
-//        JFrame frame = new JFrame();
-//        frame.getContentPane().add(panel1);
-//        frame.pack();
-//        frame.show();
-//        while(!frame.isActive());
-//        while(frame.isActive());
+        //        JPanel panel1 = new JPanel();
+        //        JPanel panel2 = new JPanel();
+        //        JPanel panel3 = new JPanel();
+        //
+        //        EtchedBorder border1 = new EtchedBorder(EtchedBorder.LOWERED, Color.red, Color.yellow);
+        //        EtchedBorder border2 = new EtchedBorder(EtchedBorder.RAISED, Color.red, Color.yellow);
+        //        panel2.setBorder(border1);
+        //        panel3.setBorder(border2);
+        //        panel2.setPreferredSize(new Dimension(200, 150));
+        //        panel3.setPreferredSize(new Dimension(200, 150));
+        //
+        //        panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));
+        //        panel1.add(panel2);
+        //        panel1.add(panel3);
+        //
+        //        JFrame frame = new JFrame();
+        //        frame.getContentPane().add(panel1);
+        //        frame.pack();
+        //        frame.show();
+        //        while(!frame.isActive());
+        //        while(frame.isActive());
     }
 
     public void testIsBorderOpaque() {
         Color shadowColor = Color.GREEN;
         Color highlightedColor = Color.RED;
-
         EtchedBorder border = new EtchedBorder(highlightedColor, shadowColor);
-        assertTrue("EtchedBorder is opaque",  border.isBorderOpaque());
-
+        assertTrue("EtchedBorder is opaque", border.isBorderOpaque());
         border = new EtchedBorder();
-        assertTrue("EtchedBorder is opaque",  border.isBorderOpaque());
+        assertTrue("EtchedBorder is opaque", border.isBorderOpaque());
     }
 
     /*
      * Class under test for Color getShadowColor(Component)
      */
     public void testGetShadowColorComponent() {
-        JComponent c1 =  new JPanel();
-        JComponent c2 =  new JPanel();
+        JComponent c1 = new JPanel();
+        JComponent c2 = new JPanel();
         c1.setBackground(new Color(110, 110, 110));
         c1.setForeground(new Color(210, 210, 210));
         c2.setBackground(new Color(10, 10, 10));
         c2.setForeground(new Color(110, 110, 110));
         Color shadowColor = Color.GREEN;
         Color highlightedColor = Color.RED;
-
         EtchedBorder border = new EtchedBorder(highlightedColor, shadowColor);
-        assertEquals("Shadow color coinsides",  shadowColor, border.getShadowColor(c1));
-        assertEquals("Shadow color coinsides",  shadowColor, border.getShadowColor(c2));
-
+        assertEquals("Shadow color coinsides", shadowColor, border.getShadowColor(c1));
+        assertEquals("Shadow color coinsides", shadowColor, border.getShadowColor(c2));
         border = new EtchedBorder();
-        assertEquals("Shadow color coinsides",  new Color(77, 77, 77), border.getShadowColor(c1));
-        assertEquals("Shadow color coinsides",  new Color(7, 7, 7), border.getShadowColor(c2));
+        assertEquals("Shadow color coinsides", new Color(77, 77, 77), border.getShadowColor(c1));
+        assertEquals("Shadow color coinsides", new Color(7, 7, 7), border.getShadowColor(c2));
     }
 
     /*
      * Class under test for Color getHighlightColor(Component)
      */
     public void testGetHighlightColorComponent() {
-        JComponent c1 =  new JPanel();
-        JComponent c2 =  new JPanel();
+        JComponent c1 = new JPanel();
+        JComponent c2 = new JPanel();
         c1.setBackground(new Color(110, 110, 110));
         c1.setForeground(new Color(210, 210, 210));
         c2.setBackground(new Color(10, 10, 10));
         c2.setForeground(new Color(110, 110, 110));
         Color shadowColor = Color.GREEN;
         Color highlightedColor = Color.RED;
-
         EtchedBorder border = new EtchedBorder(highlightedColor, shadowColor);
-        assertEquals("Highlight color coinsides",  highlightedColor, border.getHighlightColor(c1));
-        assertEquals("Highlight color coinsides",  highlightedColor, border.getHighlightColor(c2));
-
+        assertEquals("Highlight color coinsides", highlightedColor, border
+                .getHighlightColor(c1));
+        assertEquals("Highlight color coinsides", highlightedColor, border
+                .getHighlightColor(c2));
         border = new EtchedBorder();
-        assertEquals("Highlight color coinsides",  new Color(157, 157, 157), border.getHighlightColor(c1));
-        assertEquals("Highlight color coinsides",  new Color(14, 14, 14), border.getHighlightColor(c2));
+        assertEquals("Highlight color coinsides", new Color(157, 157, 157), border
+                .getHighlightColor(c1));
+        assertEquals("Highlight color coinsides", new Color(14, 14, 14), border
+                .getHighlightColor(c2));
     }
 
     /*
@@ -274,13 +257,10 @@
     public void testGetShadowColor() {
         Color shadowColor = Color.YELLOW;
         Color highlightedColor = Color.RED;
-
         EtchedBorder border = new EtchedBorder(highlightedColor, shadowColor);
         assertEquals("Shadow color coinsides", shadowColor, border.getShadowColor());
-
         shadowColor = Color.GREEN;
         highlightedColor = Color.WHITE;
-
         border = new EtchedBorder(highlightedColor, shadowColor);
         assertEquals("Shadow color coinsides", shadowColor, border.getShadowColor());
     }
@@ -291,25 +271,21 @@
     public void testGetHighlightColor() {
         Color shadowColor = Color.YELLOW;
         Color highlightedColor = Color.RED;
-
         EtchedBorder border = new EtchedBorder(highlightedColor, shadowColor);
-        assertEquals("Highlighted color coinsides", highlightedColor, border.getHighlightColor());
-
+        assertEquals("Highlighted color coinsides", highlightedColor, border
+                .getHighlightColor());
         shadowColor = Color.GREEN;
         highlightedColor = Color.WHITE;
-
         border = new EtchedBorder(highlightedColor, shadowColor);
-        assertEquals("Highlighted color coinsides", highlightedColor, border.getHighlightColor());
+        assertEquals("Highlighted color coinsides", highlightedColor, border
+                .getHighlightColor());
     }
 
     public void testGetEtchType() {
         int etchType = EtchedBorder.LOWERED;
-
         EtchedBorder border = new EtchedBorder(etchType);
         assertEquals("Etch type coinsides", etchType, border.getEtchType());
-
         etchType = EtchedBorder.RAISED;
-
         border = new EtchedBorder(etchType);
         assertEquals("Etch type coinsides", etchType, border.getEtchType());
     }
@@ -323,29 +299,21 @@
         int etchType2 = EtchedBorder.RAISED;
         EtchedBorder border1 = new EtchedBorder(etchType1, highlightedColor1, shadowColor1);
         EtchedBorder border2 = new EtchedBorder(etchType2, highlightedColor2, shadowColor2);
-
-        EtchedBorder resurrectedBorder = (EtchedBorder)serializeObject(border1);
+        EtchedBorder resurrectedBorder = (EtchedBorder) serializeObject(border1);
         assertNotNull(resurrectedBorder);
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getEtchType(),
-                border1.getEtchType());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getShadowColor(),
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getEtchType(), border1
+                .getEtchType());
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getShadowColor(),
                 border1.getShadowColor());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getHighlightColor(),
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getHighlightColor(),
                 border1.getHighlightColor());
-
-        resurrectedBorder = (EtchedBorder)serializeObject(border2);
+        resurrectedBorder = (EtchedBorder) serializeObject(border2);
         assertNotNull(resurrectedBorder);
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getEtchType(),
-                border2.getEtchType());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getShadowColor(),
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getEtchType(), border2
+                .getEtchType());
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getShadowColor(),
                 border2.getShadowColor());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getHighlightColor(),
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getHighlightColor(),
                 border2.getHighlightColor());
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/LineBorderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/LineBorderTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/LineBorderTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/border/LineBorderTest.java Sun Nov 26 12:15:43 2006
@@ -24,12 +24,10 @@
 
 import java.awt.Color;
 import java.awt.Insets;
-
 import javax.swing.JPanel;
 import javax.swing.SwingTestCase;
 
 public class LineBorderTest extends SwingTestCase {
-
     public static void main(final String[] args) {
         junit.textui.TestRunner.run(LineBorderTest.class);
     }
@@ -45,19 +43,15 @@
         LineBorder border = new LineBorder(Color.black, thickness1);
         Insets insets = new Insets(1, 1, 1, 1);
         JPanel panel = new JPanel();
-
         panel.setBorder(new LineBorder(Color.black, thickness2));
         border.getBorderInsets(panel, insets);
-
         assertEquals("insets values coinside", thickness1, insets.top);
         assertEquals("insets values coinside", thickness1, insets.left);
         assertEquals("insets values coinside", thickness1, insets.right);
         assertEquals("insets values coinside", thickness1, insets.bottom);
-
         insets = new Insets(thickness3, thickness3, thickness3, thickness3);
         panel.setBorder(new LineBorder(Color.black, thickness4));
         Insets newInsets = border.getBorderInsets(panel, insets);
-
         assertEquals("insets values coinside", thickness1, newInsets.top);
         assertEquals("insets values coinside", thickness1, newInsets.left);
         assertEquals("insets values coinside", thickness1, newInsets.right);
@@ -76,18 +70,14 @@
         LineBorder border = new LineBorder(Color.black, thickness);
         Insets insets = null;
         JPanel panel = new JPanel();
-
         panel.setBorder(new LineBorder(Color.white));
         insets = border.getBorderInsets(panel);
-
         assertEquals("insets values coinside", thickness, insets.top);
         assertEquals("insets values coinside", thickness, insets.left);
         assertEquals("insets values coinside", thickness, insets.right);
         assertEquals("insets values coinside", thickness, insets.bottom);
-
         panel.setBorder(null);
         insets = border.getBorderInsets(panel);
-
         assertEquals("insets values coinside", thickness, insets.top);
         assertEquals("insets values coinside", thickness, insets.left);
         assertEquals("insets values coinside", thickness, insets.right);
@@ -95,26 +85,24 @@
     }
 
     public void testPaintBorder() {
-//        JPanel panel = new JPanel();
-//
-//        panel.setBorder(new LineBorder(Color.red, 10, true));
-//        JFrame frame = new JFrame();
-//        frame.getContentPane().add(panel);
-//        panel.setPreferredSize(new Dimension(100, 50));
-//        frame.pack();
-//        frame.show();
-//        while(!frame.isActive());
-//        while(frame.isActive());
+        //        JPanel panel = new JPanel();
+        //
+        //        panel.setBorder(new LineBorder(Color.red, 10, true));
+        //        JFrame frame = new JFrame();
+        //        frame.getContentPane().add(panel);
+        //        panel.setPreferredSize(new Dimension(100, 50));
+        //        frame.pack();
+        //        frame.show();
+        //        while(!frame.isActive());
+        //        while(frame.isActive());
     }
 
     public void testIsBorderOpaque() {
-        LineBorder border1 =  new LineBorder(Color.black);
-        LineBorder border2 =  new LineBorder(Color.black, 11, true);
-        LineBorder border3 =  new LineBorder(Color.black, 13, false);
-
+        LineBorder border1 = new LineBorder(Color.black);
+        LineBorder border2 = new LineBorder(Color.black, 11, true);
+        LineBorder border3 = new LineBorder(Color.black, 13, false);
         assertTrue("LineBorder is opaque ", border1.isBorderOpaque());
-        assertFalse("LineBorder with round corners is not opaque ",
-                border2.isBorderOpaque());
+        assertFalse("LineBorder with round corners is not opaque ", border2.isBorderOpaque());
         assertTrue("LineBorder is opaque ", border3.isBorderOpaque());
     }
 
@@ -125,24 +113,21 @@
         int thickness = 11;
         boolean roundedCorners = true;
         Color color = Color.yellow;
-
-        LineBorder border =  new LineBorder(color, thickness, roundedCorners);
+        LineBorder border = new LineBorder(color, thickness, roundedCorners);
         assertEquals("Thickness coinsides", thickness, border.getThickness());
         assertEquals("RoundedCorners coinsides", roundedCorners, border.getRoundedCorners());
         assertEquals("Colors coinsides", color, border.getLineColor());
-
         thickness = 23;
-        roundedCorners =  false;
+        roundedCorners = false;
         color = Color.red;
-        border =  new LineBorder(color, thickness, roundedCorners);
+        border = new LineBorder(color, thickness, roundedCorners);
         assertEquals("Thickness coinsides", thickness, border.getThickness());
         assertEquals("RoundedCorners coinsides", roundedCorners, border.getRoundedCorners());
         assertEquals("Colors coinsides", color, border.getLineColor());
-
         thickness = 37;
         roundedCorners = true;
         color = Color.cyan;
-        border =  new LineBorder(color, thickness, roundedCorners);
+        border = new LineBorder(color, thickness, roundedCorners);
         assertEquals("Thickness coinsides", thickness, border.getThickness());
         assertEquals("RoundedCorners coinsides", roundedCorners, border.getRoundedCorners());
         assertEquals("Colors coinsides", color, border.getLineColor());
@@ -155,22 +140,19 @@
         int thickness = 11;
         boolean roundedCorners = false;
         Color color = Color.yellow;
-
-        LineBorder border =  new LineBorder(color, thickness);
+        LineBorder border = new LineBorder(color, thickness);
         assertEquals("Thickness coinsides", thickness, border.getThickness());
         assertEquals("RoundedCorners coinsides", roundedCorners, border.getRoundedCorners());
         assertEquals("Colors coinsides", color, border.getLineColor());
-
         thickness = 23;
         color = Color.red;
-        border =  new LineBorder(color, thickness);
+        border = new LineBorder(color, thickness);
         assertEquals("Thickness coinsides", thickness, border.getThickness());
         assertEquals("RoundedCorners coinsides", roundedCorners, border.getRoundedCorners());
         assertEquals("Colors coinsides", color, border.getLineColor());
-
         thickness = 37;
         color = Color.cyan;
-        border =  new LineBorder(color, thickness);
+        border = new LineBorder(color, thickness);
         assertEquals("Thickness coinsides", thickness, border.getThickness());
         assertEquals("RoundedCorners coinsides", roundedCorners, border.getRoundedCorners());
         assertEquals("Colors coinsides", color, border.getLineColor());
@@ -183,20 +165,17 @@
         int thickness = 1;
         boolean roundedCorners = false;
         Color color = Color.yellow;
-
-        LineBorder border =  new LineBorder(color);
+        LineBorder border = new LineBorder(color);
         assertEquals("Thickness coinsides", thickness, border.getThickness());
         assertEquals("RoundedCorners coinsides", roundedCorners, border.getRoundedCorners());
         assertEquals("Colors coinsides", color, border.getLineColor());
-
         color = Color.red;
-        border =  new LineBorder(color);
+        border = new LineBorder(color);
         assertEquals("Thickness coinsides", thickness, border.getThickness());
         assertEquals("RoundedCorners coinsides", roundedCorners, border.getRoundedCorners());
         assertEquals("Colors coinsides", color, border.getLineColor());
-
         color = Color.cyan;
-        border =  new LineBorder(color);
+        border = new LineBorder(color);
         assertEquals("Thickness coinsides", thickness, border.getThickness());
         assertEquals("RoundedCorners coinsides", roundedCorners, border.getRoundedCorners());
         assertEquals("Colors coinsides", color, border.getLineColor());
@@ -204,54 +183,48 @@
 
     public void testGetLineColor() {
         Color color = Color.yellow;
-        LineBorder border =  new LineBorder(color, 1, true);
+        LineBorder border = new LineBorder(color, 1, true);
         assertEquals("Colors coinsides", color, border.getLineColor());
-
         color = Color.red;
-        border =  new LineBorder(color, 10, false);
+        border = new LineBorder(color, 10, false);
         assertEquals("Colors coinsides", color, border.getLineColor());
-
         color = Color.cyan;
-        border =  new LineBorder(color, 110);
+        border = new LineBorder(color, 110);
         assertEquals("Colors coinsides", color, border.getLineColor());
     }
 
     public void testGetRoundedCorners() {
         boolean roundedCorners = true;
-        LineBorder border =  new LineBorder(Color.black, 1, roundedCorners);
+        LineBorder border = new LineBorder(Color.black, 1, roundedCorners);
         assertEquals("RoundedCorners coinsides", roundedCorners, border.getRoundedCorners());
-
-        roundedCorners =  false;
-        border =  new LineBorder(Color.black, 2, roundedCorners);
+        roundedCorners = false;
+        border = new LineBorder(Color.black, 2, roundedCorners);
         assertEquals("RoundedCorners coinsides", roundedCorners, border.getRoundedCorners());
-
-        border =  new LineBorder(Color.black, 1);
+        border = new LineBorder(Color.black, 1);
         assertEquals("RoundedCorners coinsides", roundedCorners, border.getRoundedCorners());
     }
 
     public void testGetThickness() {
         int thickness = 11;
-        LineBorder border =  new LineBorder(Color.black, thickness);
+        LineBorder border = new LineBorder(Color.black, thickness);
         assertEquals("Thickness coinsides", thickness, border.getThickness());
-
         thickness = 23;
-        border =  new LineBorder(Color.black, thickness, true);
+        border = new LineBorder(Color.black, thickness, true);
         assertEquals("Thickness coinsides", thickness, border.getThickness());
-
         thickness = 37;
-        border =  new LineBorder(Color.black, thickness, false);
+        border = new LineBorder(Color.black, thickness, false);
         assertEquals("Thickness coinsides", thickness, border.getThickness());
     }
 
     public void testCreateGrayLineBorder() {
-        LineBorder border = (LineBorder)LineBorder.createGrayLineBorder();
+        LineBorder border = (LineBorder) LineBorder.createGrayLineBorder();
         assertEquals("Thickness coinsides", 1, border.getThickness());
         assertFalse("RoundedCorners coinsides", border.getRoundedCorners());
         assertEquals("Colors coinsides", Color.gray, border.getLineColor());
     }
 
     public void testCreateBlackLineBorder() {
-        LineBorder border = (LineBorder)LineBorder.createBlackLineBorder();
+        LineBorder border = (LineBorder) LineBorder.createBlackLineBorder();
         assertEquals("Thickness coinsides", 1, border.getThickness());
         assertFalse("RoundedCorners coinsides", border.getRoundedCorners());
         assertEquals("Colors coinsides", Color.black, border.getLineColor());
@@ -260,29 +233,21 @@
     public void testReadWriteObject() throws Exception {
         LineBorder border1 = new LineBorder(Color.red, 33, false);
         LineBorder border2 = new LineBorder(Color.yellow, 47, true);
-
-        LineBorder resurrectedBorder = (LineBorder)serializeObject(border1);
+        LineBorder resurrectedBorder = (LineBorder) serializeObject(border1);
         assertNotNull(resurrectedBorder);
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getThickness(),
-                border1.getThickness());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getLineColor(),
-                border1.getLineColor());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getRoundedCorners(),
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getThickness(), border1
+                .getThickness());
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getLineColor(), border1
+                .getLineColor());
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getRoundedCorners(),
                 border1.getRoundedCorners());
-
-        resurrectedBorder = (LineBorder)serializeObject(border2);
+        resurrectedBorder = (LineBorder) serializeObject(border2);
         assertNotNull(resurrectedBorder);
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getThickness(),
-                border2.getThickness());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getLineColor(),
-                border2.getLineColor());
-        assertEquals("Deserialized values coinsides",
-                resurrectedBorder.getRoundedCorners(),
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getThickness(), border2
+                .getThickness());
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getLineColor(), border2
+                .getLineColor());
+        assertEquals("Deserialized values coinsides", resurrectedBorder.getRoundedCorners(),
                 border2.getRoundedCorners());
     }
 }



Mime
View raw message