jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1380034 - /jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestBooleanPropertyEditor.java
Date Sun, 02 Sep 2012 19:06:02 GMT
Author: pmouawad
Date: Sun Sep  2 19:06:01 2012
New Revision: 1380034

URL: http://svn.apache.org/viewvc?rev=1380034&view=rev
Log:
Use constants

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestBooleanPropertyEditor.java

Modified: jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestBooleanPropertyEditor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestBooleanPropertyEditor.java?rev=1380034&r1=1380033&r2=1380034&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestBooleanPropertyEditor.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestBooleanPropertyEditor.java Sun
Sep  2 19:06:01 2012
@@ -26,6 +26,9 @@ import java.beans.PropertyEditorManager;
  */
 public class TestBooleanPropertyEditor extends junit.framework.TestCase {
  
+    private static final String FALSE = "False";
+    private static final String TRUE = "True";
+
     public TestBooleanPropertyEditor(String name) {
         super(name);
     }
@@ -35,21 +38,21 @@ public class TestBooleanPropertyEditor e
         assertNotNull(propertyEditor);
         String tags[] = propertyEditor.getTags();
         assertEquals(2,tags.length);
-        assertEquals("True",tags[0]);
-        assertEquals("False",tags[1]);
+        assertEquals(TRUE,tags[0]);
+        assertEquals(FALSE,tags[1]);
         
         propertyEditor.setValue(Boolean.FALSE);
-        assertEquals("False",propertyEditor.getAsText());
-        propertyEditor.setAsText("False");
-        assertEquals("False",propertyEditor.getAsText());
+        assertEquals(FALSE,propertyEditor.getAsText());
+        propertyEditor.setAsText(FALSE);
+        assertEquals(FALSE,propertyEditor.getAsText());
         propertyEditor.setAsText("false");
-        assertEquals("False",propertyEditor.getAsText());
+        assertEquals(FALSE,propertyEditor.getAsText());
         
         propertyEditor.setValue(Boolean.TRUE);
-        assertEquals("True",propertyEditor.getAsText());
-        propertyEditor.setAsText("True");
-        assertEquals("True",propertyEditor.getAsText());
+        assertEquals(TRUE,propertyEditor.getAsText());
+        propertyEditor.setAsText(TRUE);
+        assertEquals(TRUE,propertyEditor.getAsText());
         propertyEditor.setAsText("true");
-        assertEquals("True",propertyEditor.getAsText());
+        assertEquals(TRUE,propertyEditor.getAsText());
         }
 }
\ No newline at end of file



Mime
View raw message