You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2009/05/10 20:19:30 UTC

svn commit: r773382 [5/6] - in /jakarta/jmeter/trunk/test/src/org/apache: jmeter/engine/ jmeter/engine/util/ jmeter/extractor/ jmeter/functions/ jmeter/gui/action/ jmeter/gui/util/ jmeter/junit/ jmeter/junit/stubs/ jmeter/monitor/model/ jmeter/monitor/...

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPFileArgs.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPFileArgs.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPFileArgs.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPFileArgs.java Sun May 10 18:19:28 2009
@@ -25,94 +25,94 @@
 import org.apache.jmeter.testelement.property.PropertyIterator;
 
 public class TestHTTPFileArgs extends TestCase {
-	public TestHTTPFileArgs(String name) {
-		super(name);
-	}
-
-	public void testConstructors() throws Exception {
-		HTTPFileArgs files = new HTTPFileArgs();
-		assertEquals(0, files.getHTTPFileArgCount());
-	}
-
-	public void testAdding() throws Exception {
-		HTTPFileArgs files = new HTTPFileArgs();
-		assertEquals(0, files.getHTTPFileArgCount());
-		files.addHTTPFileArg("hede");
-		assertEquals(1, files.getHTTPFileArgCount());
-		assertEquals("hede", ((HTTPFileArg) files.iterator().next().getObjectValue()).getPath());
-		HTTPFileArg file = new HTTPFileArg("hodo");
-		files.addHTTPFileArg(file);
-		assertEquals(2, files.getHTTPFileArgCount());
-		PropertyIterator iter = files.iterator();
-		assertEquals("hede", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		assertEquals("hodo", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		files.addEmptyHTTPFileArg();
-		assertEquals(3, files.getHTTPFileArgCount());
-		iter = files.iterator();
-		assertEquals("hede", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		assertEquals("hodo", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		assertEquals("", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-	}
-
-	public void testSetHTTPFileArgs() throws Exception {
-		List newHTTPFileArgs = new LinkedList();
-		newHTTPFileArgs.add(new HTTPFileArg("hede"));
-		HTTPFileArgs files = new HTTPFileArgs();
-		files.setHTTPFileArgs(newHTTPFileArgs);
-		assertEquals(1, files.getHTTPFileArgCount());
-		assertEquals("hede", ((HTTPFileArg) files.iterator().next().getObjectValue()).getPath());
-	}
-
-	public void testRemoving() throws Exception {
-		HTTPFileArgs files = new HTTPFileArgs();
-		assertEquals(0, files.getHTTPFileArgCount());
-		files.addHTTPFileArg("hede");
-		assertEquals(1, files.getHTTPFileArgCount());
-		files.clear();
-		assertEquals(0, files.getHTTPFileArgCount());
-		files.addHTTPFileArg("file1");
-		files.addHTTPFileArg("file2");
-		files.addHTTPFileArg("file3");
-		HTTPFileArg file = new HTTPFileArg("file4");
-		files.addHTTPFileArg(file);
-		files.addHTTPFileArg("file5");
-		files.addHTTPFileArg("file6");
-		assertEquals(6, files.getHTTPFileArgCount());
-		files.removeHTTPFileArg("file3");
-		assertEquals(5, files.getHTTPFileArgCount());
-		PropertyIterator iter = files.iterator();
-		assertEquals("file1", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		assertEquals("file2", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		assertEquals("file4", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		assertEquals("file5", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		assertEquals("file6", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		files.removeHTTPFileArg(file);
-		assertEquals(4, files.getHTTPFileArgCount());
-		iter = files.iterator();
-		assertEquals("file1", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		assertEquals("file2", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		assertEquals("file5", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		assertEquals("file6", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		files.removeHTTPFileArg(new HTTPFileArg("file5"));
-		assertEquals(3, files.getHTTPFileArgCount());
-		iter = files.iterator();
-		assertEquals("file1", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		assertEquals("file2", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		assertEquals("file6", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		files.removeHTTPFileArg(1);
-		assertEquals(2, files.getHTTPFileArgCount());
-		iter = files.iterator();
-		assertEquals("file1", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		assertEquals("file6", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
-		files.removeAllHTTPFileArgs();
-		assertEquals(0, files.getHTTPFileArgCount());
-	}
-
-	public void testToString() throws Exception {
-		HTTPFileArgs files = new HTTPFileArgs();
-		files.addHTTPFileArg("file1");
-		files.addHTTPFileArg("file2");
-		files.addHTTPFileArg("file3");
-		assertEquals("file1&file2&file3", files.toString());
-	}
+    public TestHTTPFileArgs(String name) {
+        super(name);
+    }
+
+    public void testConstructors() throws Exception {
+        HTTPFileArgs files = new HTTPFileArgs();
+        assertEquals(0, files.getHTTPFileArgCount());
+    }
+
+    public void testAdding() throws Exception {
+        HTTPFileArgs files = new HTTPFileArgs();
+        assertEquals(0, files.getHTTPFileArgCount());
+        files.addHTTPFileArg("hede");
+        assertEquals(1, files.getHTTPFileArgCount());
+        assertEquals("hede", ((HTTPFileArg) files.iterator().next().getObjectValue()).getPath());
+        HTTPFileArg file = new HTTPFileArg("hodo");
+        files.addHTTPFileArg(file);
+        assertEquals(2, files.getHTTPFileArgCount());
+        PropertyIterator iter = files.iterator();
+        assertEquals("hede", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        assertEquals("hodo", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        files.addEmptyHTTPFileArg();
+        assertEquals(3, files.getHTTPFileArgCount());
+        iter = files.iterator();
+        assertEquals("hede", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        assertEquals("hodo", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        assertEquals("", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+    }
+
+    public void testSetHTTPFileArgs() throws Exception {
+        List newHTTPFileArgs = new LinkedList();
+        newHTTPFileArgs.add(new HTTPFileArg("hede"));
+        HTTPFileArgs files = new HTTPFileArgs();
+        files.setHTTPFileArgs(newHTTPFileArgs);
+        assertEquals(1, files.getHTTPFileArgCount());
+        assertEquals("hede", ((HTTPFileArg) files.iterator().next().getObjectValue()).getPath());
+    }
+
+    public void testRemoving() throws Exception {
+        HTTPFileArgs files = new HTTPFileArgs();
+        assertEquals(0, files.getHTTPFileArgCount());
+        files.addHTTPFileArg("hede");
+        assertEquals(1, files.getHTTPFileArgCount());
+        files.clear();
+        assertEquals(0, files.getHTTPFileArgCount());
+        files.addHTTPFileArg("file1");
+        files.addHTTPFileArg("file2");
+        files.addHTTPFileArg("file3");
+        HTTPFileArg file = new HTTPFileArg("file4");
+        files.addHTTPFileArg(file);
+        files.addHTTPFileArg("file5");
+        files.addHTTPFileArg("file6");
+        assertEquals(6, files.getHTTPFileArgCount());
+        files.removeHTTPFileArg("file3");
+        assertEquals(5, files.getHTTPFileArgCount());
+        PropertyIterator iter = files.iterator();
+        assertEquals("file1", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        assertEquals("file2", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        assertEquals("file4", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        assertEquals("file5", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        assertEquals("file6", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        files.removeHTTPFileArg(file);
+        assertEquals(4, files.getHTTPFileArgCount());
+        iter = files.iterator();
+        assertEquals("file1", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        assertEquals("file2", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        assertEquals("file5", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        assertEquals("file6", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        files.removeHTTPFileArg(new HTTPFileArg("file5"));
+        assertEquals(3, files.getHTTPFileArgCount());
+        iter = files.iterator();
+        assertEquals("file1", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        assertEquals("file2", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        assertEquals("file6", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        files.removeHTTPFileArg(1);
+        assertEquals(2, files.getHTTPFileArgCount());
+        iter = files.iterator();
+        assertEquals("file1", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        assertEquals("file6", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
+        files.removeAllHTTPFileArgs();
+        assertEquals(0, files.getHTTPFileArgCount());
+    }
+
+    public void testToString() throws Exception {
+        HTTPFileArgs files = new HTTPFileArgs();
+        files.addHTTPFileArg("file1");
+        files.addHTTPFileArg("file2");
+        files.addHTTPFileArg("file3");
+        assertEquals("file1&file2&file3", files.toString());
+    }
 }

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPUtils.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPUtils.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPUtils.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPUtils.java Sun May 10 18:19:28 2009
@@ -23,12 +23,12 @@
 import junit.framework.TestCase;
 
 public class TestHTTPUtils extends TestCase {
-		public TestHTTPUtils(String name) {
-			super(name);
-		}
+        public TestHTTPUtils(String name) {
+            super(name);
+        }
 
-		public void testgetEncoding() throws Exception {
-		    assertNull(ConversionUtils.getEncodingFromContentType("xyx"));
+        public void testgetEncoding() throws Exception {
+            assertNull(ConversionUtils.getEncodingFromContentType("xyx"));
             assertEquals("utf8",ConversionUtils.getEncodingFromContentType("charset=utf8"));
             assertEquals("utf8",ConversionUtils.getEncodingFromContentType("charset=\"utf8\""));
             assertEquals("utf8",ConversionUtils.getEncodingFromContentType("text/plain ;charset=utf8"));
@@ -36,15 +36,15 @@
             assertNull(ConversionUtils.getEncodingFromContentType("charset="));
             assertNull(ConversionUtils.getEncodingFromContentType(";charset=;"));
             assertNull(ConversionUtils.getEncodingFromContentType(";charset=no-such-charset;"));
-		}
-		
-		public void testMakeRelativeURL() throws Exception {
-		    URL base = new URL("http://host/a/b/c");
-		    assertEquals(new URL("http://host/a/b/d"),ConversionUtils.makeRelativeURL(base,"d"));
+        }
+        
+        public void testMakeRelativeURL() throws Exception {
+            URL base = new URL("http://host/a/b/c");
+            assertEquals(new URL("http://host/a/b/d"),ConversionUtils.makeRelativeURL(base,"d"));
             assertEquals(new URL("http://host/a/d"),ConversionUtils.makeRelativeURL(base,"../d"));
             assertEquals(new URL("http://host/d"),ConversionUtils.makeRelativeURL(base,"../../d"));
             assertEquals(new URL("http://host/d"),ConversionUtils.makeRelativeURL(base,"../../../d"));
             assertEquals(new URL("http://host/d"),ConversionUtils.makeRelativeURL(base,"../../../../d"));
             assertEquals(new URL("http://host/../d"),ConversionUtils.makeRelativeURL(base,"/../d"));
-		}
+        }
 }

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestLogFilter.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestLogFilter.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestLogFilter.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestLogFilter.java Sun May 10 18:19:28 2009
@@ -22,136 +22,136 @@
 
 public class TestLogFilter extends JMeterTestCase {
 
-		private static final String TESTSTR = "/test/helloworld.html";
+        private static final String TESTSTR = "/test/helloworld.html";
 
-		private static final String TESTSTROUT = "/test/helloworld.jsp";
+        private static final String TESTSTROUT = "/test/helloworld.jsp";
 
-		private static class TestData {
-			private final String file;
+        private static class TestData {
+            private final String file;
 
-			private final boolean exclfile;
+            private final boolean exclfile;
 
-			private final boolean inclfile;
-
-			private final boolean exclpatt;
-
-			private final boolean inclpatt;
-
-			TestData(String f, boolean exf, boolean inf, boolean exp, boolean inp) {
-				file = f;
-				exclfile = exf;
-				inclfile = inf;
-				exclpatt = exp;
-				inclpatt = inp;
-			}
-		}
-
-		private static final String[] INCL = { "hello.html", "index.html", "/index.jsp" };
-
-		private static final String[] PATTERNS = { "index", ".jtml" };
-
-		private static final TestData[] TESTDATA = {
-		// file exclf inclf exclp inclp
-				new TestData("/test/hello.jsp", true, false, true, false),
-				new TestData("/test/one/hello.html", false, true, true, false),
-				new TestData("hello.jsp", true, false, true, false),
-				new TestData("hello.htm", true, false, true, false),
-				new TestData("/test/open.jsp", true, false, true, false),
-				new TestData("/test/open.html", true, false, true, false),
-				new TestData("/index.jsp", false, true, false, true),
-				new TestData("/index.jhtml", true, false, false, true),
-				new TestData("newindex.jsp", true, false, false, true),
-				new TestData("oldindex.jsp", true, false, false, true),
-				new TestData("oldindex1.jsp", true, false, false, true),
-				new TestData("oldindex2.jsp", true, false, false, true),
-				new TestData("oldindex3.jsp", true, false, false, true),
-				new TestData("oldindex4.jsp", true, false, false, true),
-				new TestData("oldindex5.jsp", true, false, false, true),
-				new TestData("oldindex6.jsp", true, false, false, true),
-				new TestData("/test/index.htm", true, false, false, true) };
-
-		public void testConstruct() {
-			new LogFilter();
-		}
-
-		private LogFilter testf;
-
-		public void setUp() {
-			testf = new LogFilter();
-		}
-
-		public void testReplaceExtension() {
-			testf.setReplaceExtension("html", "jsp");
-			testf.isFiltered(TESTSTR,null);// set the required variables
-			assertEquals(TESTSTROUT, testf.filter(TESTSTR));
-		}
-
-		public void testExcludeFiles() {
-			testf.excludeFiles(INCL);
-			for (int idx = 0; idx < TESTDATA.length; idx++) {
-				TestData td = TESTDATA[idx];
-				String theFile = td.file;
-				boolean expect = td.exclfile;
-
-				testf.isFiltered(theFile,null);
-				String line = testf.filter(theFile);
-				if (line != null) {
-					assertTrue("Expect to accept " + theFile, expect);
-				} else {
-					assertFalse("Expect to reject " + theFile, expect);
-				}
-			}
-		}
-
-		public void testIncludeFiles() {
-			testf.includeFiles(INCL);
-			for (int idx = 0; idx < TESTDATA.length; idx++) {
-				TestData td = TESTDATA[idx];
-				String theFile = td.file;
-				boolean expect = td.inclfile;
-
-				testf.isFiltered(theFile,null);
-				String line = testf.filter(theFile);
-				if (line != null) {
-					assertTrue("Expect to accept " + theFile, expect);
-				} else {
-					assertFalse("Expect to reject " + theFile, expect);
-				}
-			}
-
-		}
-
-		public void testExcludePattern() {
-			testf.excludePattern(PATTERNS);
-			for (int idx = 0; idx < TESTDATA.length; idx++) {
-				TestData td = TESTDATA[idx];
-				String theFile = td.file;
-				boolean expect = td.exclpatt;
-
-				assertEquals(!expect, testf.isFiltered(theFile,null));
-				String line = testf.filter(theFile);
-				if (line != null) {
-					assertTrue("Expect to accept " + theFile, expect);
-				} else {
-					assertFalse("Expect to reject " + theFile, expect);
-				}
-			}
-		}
-
-		public void testIncludePattern() {
-			testf.includePattern(PATTERNS);
-			for (int idx = 0; idx < TESTDATA.length; idx++) {
-				TestData td = TESTDATA[idx];
-				String theFile = td.file;
-				boolean expect = td.inclpatt;
-
-				assertEquals(!expect, testf.isFiltered(theFile,null));
-				String line = testf.filter(theFile);
-				if (line != null) {
-					assertTrue("Expect to accept " + theFile, expect);
-				} else {
-					assertFalse("Expect to reject " + theFile, expect);
-				}
-			}
-		}
+            private final boolean inclfile;
+
+            private final boolean exclpatt;
+
+            private final boolean inclpatt;
+
+            TestData(String f, boolean exf, boolean inf, boolean exp, boolean inp) {
+                file = f;
+                exclfile = exf;
+                inclfile = inf;
+                exclpatt = exp;
+                inclpatt = inp;
+            }
+        }
+
+        private static final String[] INCL = { "hello.html", "index.html", "/index.jsp" };
+
+        private static final String[] PATTERNS = { "index", ".jtml" };
+
+        private static final TestData[] TESTDATA = {
+        // file exclf inclf exclp inclp
+                new TestData("/test/hello.jsp", true, false, true, false),
+                new TestData("/test/one/hello.html", false, true, true, false),
+                new TestData("hello.jsp", true, false, true, false),
+                new TestData("hello.htm", true, false, true, false),
+                new TestData("/test/open.jsp", true, false, true, false),
+                new TestData("/test/open.html", true, false, true, false),
+                new TestData("/index.jsp", false, true, false, true),
+                new TestData("/index.jhtml", true, false, false, true),
+                new TestData("newindex.jsp", true, false, false, true),
+                new TestData("oldindex.jsp", true, false, false, true),
+                new TestData("oldindex1.jsp", true, false, false, true),
+                new TestData("oldindex2.jsp", true, false, false, true),
+                new TestData("oldindex3.jsp", true, false, false, true),
+                new TestData("oldindex4.jsp", true, false, false, true),
+                new TestData("oldindex5.jsp", true, false, false, true),
+                new TestData("oldindex6.jsp", true, false, false, true),
+                new TestData("/test/index.htm", true, false, false, true) };
+
+        public void testConstruct() {
+            new LogFilter();
+        }
+
+        private LogFilter testf;
+
+        public void setUp() {
+            testf = new LogFilter();
+        }
+
+        public void testReplaceExtension() {
+            testf.setReplaceExtension("html", "jsp");
+            testf.isFiltered(TESTSTR,null);// set the required variables
+            assertEquals(TESTSTROUT, testf.filter(TESTSTR));
+        }
+
+        public void testExcludeFiles() {
+            testf.excludeFiles(INCL);
+            for (int idx = 0; idx < TESTDATA.length; idx++) {
+                TestData td = TESTDATA[idx];
+                String theFile = td.file;
+                boolean expect = td.exclfile;
+
+                testf.isFiltered(theFile,null);
+                String line = testf.filter(theFile);
+                if (line != null) {
+                    assertTrue("Expect to accept " + theFile, expect);
+                } else {
+                    assertFalse("Expect to reject " + theFile, expect);
+                }
+            }
+        }
+
+        public void testIncludeFiles() {
+            testf.includeFiles(INCL);
+            for (int idx = 0; idx < TESTDATA.length; idx++) {
+                TestData td = TESTDATA[idx];
+                String theFile = td.file;
+                boolean expect = td.inclfile;
+
+                testf.isFiltered(theFile,null);
+                String line = testf.filter(theFile);
+                if (line != null) {
+                    assertTrue("Expect to accept " + theFile, expect);
+                } else {
+                    assertFalse("Expect to reject " + theFile, expect);
+                }
+            }
+
+        }
+
+        public void testExcludePattern() {
+            testf.excludePattern(PATTERNS);
+            for (int idx = 0; idx < TESTDATA.length; idx++) {
+                TestData td = TESTDATA[idx];
+                String theFile = td.file;
+                boolean expect = td.exclpatt;
+
+                assertEquals(!expect, testf.isFiltered(theFile,null));
+                String line = testf.filter(theFile);
+                if (line != null) {
+                    assertTrue("Expect to accept " + theFile, expect);
+                } else {
+                    assertFalse("Expect to reject " + theFile, expect);
+                }
+            }
+        }
+
+        public void testIncludePattern() {
+            testf.includePattern(PATTERNS);
+            for (int idx = 0; idx < TESTDATA.length; idx++) {
+                TestData td = TESTDATA[idx];
+                String theFile = td.file;
+                boolean expect = td.inclpatt;
+
+                assertEquals(!expect, testf.isFiltered(theFile,null));
+                String line = testf.filter(theFile);
+                if (line != null) {
+                    assertTrue("Expect to accept " + theFile, expect);
+                } else {
+                    assertFalse("Expect to reject " + theFile, expect);
+                }
+            }
+        }
 }

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestTCLogParser.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestTCLogParser.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestTCLogParser.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestTCLogParser.java Sun May 10 18:19:28 2009
@@ -24,30 +24,30 @@
 // TODO - more tests needed
 
 public class TestTCLogParser  extends JMeterTestCase {
-		private static final TCLogParser tclp = new TCLogParser();
+        private static final TCLogParser tclp = new TCLogParser();
 
-		private static final String URL1 = "127.0.0.1 - - [08/Jan/2003:07:03:54 -0500] \"GET /addrbook/ HTTP/1.1\" 200 1981";
+        private static final String URL1 = "127.0.0.1 - - [08/Jan/2003:07:03:54 -0500] \"GET /addrbook/ HTTP/1.1\" 200 1981";
 
-		private static final String URL2 = "127.0.0.1 - - [08/Jan/2003:07:03:54 -0500] \"GET /addrbook?x=y HTTP/1.1\" 200 1981";
+        private static final String URL2 = "127.0.0.1 - - [08/Jan/2003:07:03:54 -0500] \"GET /addrbook?x=y HTTP/1.1\" 200 1981";
 
-		public void testConstruct() throws Exception {
-			TCLogParser tcp;
-			tcp = new TCLogParser();
-			assertNull("Should not have set the filename", tcp.FILENAME);
-
-			String file = "testfiles/access.log";
-			tcp = new TCLogParser(file);
-			assertEquals("Filename should have been saved", file, tcp.FILENAME);
-		}
-
-		public void testcleanURL() throws Exception {
-			String res = tclp.cleanURL(URL1);
-			assertEquals("/addrbook/", res);
-			assertNull(tclp.stripFile(res, new HTTPNullSampler()));
-		}
-
-		public void testcheckURL() throws Exception {
-			assertFalse("URL is not have a query", tclp.checkURL(URL1));
-			assertTrue("URL is a query", tclp.checkURL(URL2));
-		}
+        public void testConstruct() throws Exception {
+            TCLogParser tcp;
+            tcp = new TCLogParser();
+            assertNull("Should not have set the filename", tcp.FILENAME);
+
+            String file = "testfiles/access.log";
+            tcp = new TCLogParser(file);
+            assertEquals("Filename should have been saved", file, tcp.FILENAME);
+        }
+
+        public void testcleanURL() throws Exception {
+            String res = tclp.cleanURL(URL1);
+            assertEquals("/addrbook/", res);
+            assertNull(tclp.stripFile(res, new HTTPNullSampler()));
+        }
+
+        public void testcheckURL() throws Exception {
+            assertFalse("URL is not have a query", tclp.checkURL(URL1));
+            assertTrue("URL is a query", tclp.checkURL(URL2));
+        }
 }
\ No newline at end of file

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/ldap/config/gui/PackageTest.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/ldap/config/gui/PackageTest.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/ldap/config/gui/PackageTest.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/ldap/config/gui/PackageTest.java Sun May 10 18:19:28 2009
@@ -21,31 +21,31 @@
 import junit.framework.TestCase;
 
 public class PackageTest extends TestCase {
-		/**
-		 * Create a new test.
-		 * 
-		 * @param name
-		 *            the name of the test
-		 */
-		public PackageTest(String name) {
-			super(name);
-		}
+        /**
+         * Create a new test.
+         * 
+         * @param name
+         *            the name of the test
+         */
+        public PackageTest(String name) {
+            super(name);
+        }
 
-		/**
-		 * Test that adding an argument to the table results in an appropriate
-		 * TestElement being created.
-		 * 
-		 * @throws Exception
-		 *             if an exception occurred during the test
-		 */
-		public void testLDAPArgumentCreation() throws Exception {
-			LDAPArgumentsPanel gui = new LDAPArgumentsPanel();
-			gui.tableModel.addRow(new LDAPArgument());
-			gui.tableModel.setValueAt("howdy", 0, 0);
-			gui.tableModel.addRow(new LDAPArgument());
-			gui.tableModel.setValueAt("doody", 0, 1);
+        /**
+         * Test that adding an argument to the table results in an appropriate
+         * TestElement being created.
+         * 
+         * @throws Exception
+         *             if an exception occurred during the test
+         */
+        public void testLDAPArgumentCreation() throws Exception {
+            LDAPArgumentsPanel gui = new LDAPArgumentsPanel();
+            gui.tableModel.addRow(new LDAPArgument());
+            gui.tableModel.setValueAt("howdy", 0, 0);
+            gui.tableModel.addRow(new LDAPArgument());
+            gui.tableModel.setValueAt("doody", 0, 1);
 
-			assertEquals("=", ((LDAPArgument) ((LDAPArguments) gui.createTestElement()).getArguments().get(0)
-					.getObjectValue()).getMetaData());
-		}
+            assertEquals("=", ((LDAPArgument) ((LDAPArguments) gui.createTestElement()).getArguments().get(0)
+                    .getObjectValue()).getMetaData());
+        }
 }

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java Sun May 10 18:19:28 2009
@@ -57,138 +57,138 @@
 
 public class PackageTest extends TestCase {
 
-	private static final String MESSAGES = "messages";
+    private static final String MESSAGES = "messages";
 
     private static PropertyResourceBundle defaultPRB;
 
-	// Read resource into ResourceBundle and store in List
-	private PropertyResourceBundle getRAS(String res) throws Exception {
-		InputStream ras = this.getClass().getResourceAsStream(res);
-		if (ras == null){
-		    return null;
-		}
-		return new PropertyResourceBundle(ras);
-	}
-
-	private static final Object[] DUMMY_PARAMS = new Object[] { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
-
-	// Read resource file saving the keys
-	private int readRF(String res, List l) throws Exception {
-		int fails = 0;
-		InputStream ras = this.getClass().getResourceAsStream(res);
-		if (ras==null){
-		    if (MESSAGES.equals(resourcePrefix)|| lang.length() == 0 ){
-		        throw new IOException("Cannot open resource file "+res);
-		    } else {
-		        return 0;
-		    }
-		}
-		BufferedReader fileReader = new BufferedReader(new InputStreamReader(ras));
-		String s;
-		while ((s = fileReader.readLine()) != null) {
-			if (s.length() > 0 && !s.startsWith("#") && !s.startsWith("!")) {
-				int equ = s.indexOf('=');
-				String key = s.substring(0, equ);
-				if (resourcePrefix.equals(MESSAGES)){// Only relevant for messages
-    				/*
-    				 * JMeterUtils.getResString() converts space to _ and lowercases
-    				 * the key, so make sure all keys pass the test
-    				 */
-    				if ((key.indexOf(' ') >= 0) || !key.toLowerCase(java.util.Locale.ENGLISH).equals(key)) {
-    					System.out.println("Invalid key for JMeterUtils " + key);
-    					fails++;
-    				}
-				}
-				String val = s.substring(equ + 1);
-				l.add(key); // Store the key
-				/*
-				 * Now check for invalid message format: if string contains {0}
-				 * and ' there may be a problem, so do a format with dummy
-				 * parameters and check if there is a { in the output. A bit
-				 * crude, but should be enough for now.
-				 */
-				if (val.indexOf("{0}") > 0 && val.indexOf("'") > 0) {
-					String m = java.text.MessageFormat.format(val, DUMMY_PARAMS);
-					if (m.indexOf("{") > 0) {
-						fails++;
-						System.out.println("Incorrect message format ? (input/output) for: "+key);
-						System.out.println(val);
-						System.out.println(m);
-					}
-				}
-
-			}
-		}
-		return fails;
-	}
-
-	// Helper method to construct resource name
-	private String getResName(String lang) {
-		if (lang.length() == 0) {
-			return resourcePrefix+".properties";
-		} else {
-			return resourcePrefix+"_" + lang + ".properties";
-		}
-	}
-
-	private void check(String resname) throws Exception {
-		check(resname, true);// check that there aren't any extra entries
-	}
-
-	/*
-	 * perform the checks on the resources
-	 * 
-	 */
-	private void check(String resname, boolean checkUnexpected) throws Exception {
-		ArrayList alf = new ArrayList(500);// holds keys from file
-		String res = getResName(resname);
-		subTestFailures += readRF(res, alf);
-		Collections.sort(alf);
-
-		// Look for duplicate keys in the file
-		String last = "";
-		for (int i = 0; i < alf.size(); i++) {
-			String curr = (String) alf.get(i);
-			if (curr.equals(last)) {
-				subTestFailures++;
-				System.out.println("\nDuplicate key =" + curr + " in " + res);
-			}
-			last = curr;
-		}
-
-		if (resname.length() == 0) // Must be the default resource file
-		{
-			defaultPRB = getRAS(res);
-			if (defaultPRB == null){
-			    throw new IOException("Could not find required file: "+res);
-			}
-		} else if (checkUnexpected) {
-			// Check all the keys are in the default props file
+    // Read resource into ResourceBundle and store in List
+    private PropertyResourceBundle getRAS(String res) throws Exception {
+        InputStream ras = this.getClass().getResourceAsStream(res);
+        if (ras == null){
+            return null;
+        }
+        return new PropertyResourceBundle(ras);
+    }
+
+    private static final Object[] DUMMY_PARAMS = new Object[] { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+
+    // Read resource file saving the keys
+    private int readRF(String res, List l) throws Exception {
+        int fails = 0;
+        InputStream ras = this.getClass().getResourceAsStream(res);
+        if (ras==null){
+            if (MESSAGES.equals(resourcePrefix)|| lang.length() == 0 ){
+                throw new IOException("Cannot open resource file "+res);
+            } else {
+                return 0;
+            }
+        }
+        BufferedReader fileReader = new BufferedReader(new InputStreamReader(ras));
+        String s;
+        while ((s = fileReader.readLine()) != null) {
+            if (s.length() > 0 && !s.startsWith("#") && !s.startsWith("!")) {
+                int equ = s.indexOf('=');
+                String key = s.substring(0, equ);
+                if (resourcePrefix.equals(MESSAGES)){// Only relevant for messages
+                    /*
+                     * JMeterUtils.getResString() converts space to _ and lowercases
+                     * the key, so make sure all keys pass the test
+                     */
+                    if ((key.indexOf(' ') >= 0) || !key.toLowerCase(java.util.Locale.ENGLISH).equals(key)) {
+                        System.out.println("Invalid key for JMeterUtils " + key);
+                        fails++;
+                    }
+                }
+                String val = s.substring(equ + 1);
+                l.add(key); // Store the key
+                /*
+                 * Now check for invalid message format: if string contains {0}
+                 * and ' there may be a problem, so do a format with dummy
+                 * parameters and check if there is a { in the output. A bit
+                 * crude, but should be enough for now.
+                 */
+                if (val.indexOf("{0}") > 0 && val.indexOf("'") > 0) {
+                    String m = java.text.MessageFormat.format(val, DUMMY_PARAMS);
+                    if (m.indexOf("{") > 0) {
+                        fails++;
+                        System.out.println("Incorrect message format ? (input/output) for: "+key);
+                        System.out.println(val);
+                        System.out.println(m);
+                    }
+                }
+
+            }
+        }
+        return fails;
+    }
+
+    // Helper method to construct resource name
+    private String getResName(String lang) {
+        if (lang.length() == 0) {
+            return resourcePrefix+".properties";
+        } else {
+            return resourcePrefix+"_" + lang + ".properties";
+        }
+    }
+
+    private void check(String resname) throws Exception {
+        check(resname, true);// check that there aren't any extra entries
+    }
+
+    /*
+     * perform the checks on the resources
+     * 
+     */
+    private void check(String resname, boolean checkUnexpected) throws Exception {
+        ArrayList alf = new ArrayList(500);// holds keys from file
+        String res = getResName(resname);
+        subTestFailures += readRF(res, alf);
+        Collections.sort(alf);
+
+        // Look for duplicate keys in the file
+        String last = "";
+        for (int i = 0; i < alf.size(); i++) {
+            String curr = (String) alf.get(i);
+            if (curr.equals(last)) {
+                subTestFailures++;
+                System.out.println("\nDuplicate key =" + curr + " in " + res);
+            }
+            last = curr;
+        }
+
+        if (resname.length() == 0) // Must be the default resource file
+        {
+            defaultPRB = getRAS(res);
+            if (defaultPRB == null){
+                throw new IOException("Could not find required file: "+res);
+            }
+        } else if (checkUnexpected) {
+            // Check all the keys are in the default props file
             PropertyResourceBundle prb = getRAS(res); 
             if (prb == null){
                 return;
             }
-			Enumeration enumr = prb.getKeys();
-			while (enumr.hasMoreElements()) {
-				String key = null;
-				try {
-					key = (String) enumr.nextElement();
-					defaultPRB.getString(key); // Check key is in default
-				} catch (MissingResourceException e) {
-					subTestFailures++;
-					System.out.println(resourcePrefix + "_" + resname + " has unexpected key: " + key);
-				}
-			}
-		}
-
-		if (subTestFailures > 0) {
-			fail("One or more subtests failed");
-		}
-	}
-
-	// TODO generate list by scanning for *Resources.properties
-	private static final String[] prefixList={
-	    MESSAGES, // This is in the same package, so no need for full path name
+            Enumeration enumr = prb.getKeys();
+            while (enumr.hasMoreElements()) {
+                String key = null;
+                try {
+                    key = (String) enumr.nextElement();
+                    defaultPRB.getString(key); // Check key is in default
+                } catch (MissingResourceException e) {
+                    subTestFailures++;
+                    System.out.println(resourcePrefix + "_" + resname + " has unexpected key: " + key);
+                }
+            }
+        }
+
+        if (subTestFailures > 0) {
+            fail("One or more subtests failed");
+        }
+    }
+
+    // TODO generate list by scanning for *Resources.properties
+    private static final String[] prefixList={
+        MESSAGES, // This is in the same package, so no need for full path name
         "/org/apache/jmeter/assertions/BSFAssertionResources",
         "/org/apache/jmeter/config/CSVDataSetResources",
         "/org/apache/jmeter/config/RandomVariableConfigResources",
@@ -209,31 +209,31 @@
         "/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources",
     };
 
-	/*
+    /*
      * Use a suite to ensure that the default is done first
     */
-	public static Test suite() {
-		TestSuite ts = new TestSuite("Resources PackageTest");
-		for(int j=0; j < prefixList.length; j++){
-		    String prefix = prefixList[j];
-		    TestSuite pfx = new TestSuite(prefix) ;
-		    pfx.addTest(new PackageTest("testLang","", prefix)); // load the default resource
-	        String lang[] = JMeterMenuBar.getLanguages();
-	        for(int i=0; i < lang.length; i++ ){
-	            if (!"en".equals(lang[i])){ // Don't try to check the default language
-	                pfx.addTest(new PackageTest("testLang", lang[i], prefix));
-	            }
-	        }
-	        ts.addTest(pfx);
-		}
+    public static Test suite() {
+        TestSuite ts = new TestSuite("Resources PackageTest");
+        for(int j=0; j < prefixList.length; j++){
+            String prefix = prefixList[j];
+            TestSuite pfx = new TestSuite(prefix) ;
+            pfx.addTest(new PackageTest("testLang","", prefix)); // load the default resource
+            String lang[] = JMeterMenuBar.getLanguages();
+            for(int i=0; i < lang.length; i++ ){
+                if (!"en".equals(lang[i])){ // Don't try to check the default language
+                    pfx.addTest(new PackageTest("testLang", lang[i], prefix));
+                }
+            }
+            ts.addTest(pfx);
+        }
 
-		return ts;
-	}
+        return ts;
+    }
 
-	private int subTestFailures;
+    private int subTestFailures;
 
-	private final String lang;
-	
+    private final String lang;
+    
     private final String resourcePrefix; // e.g. "messages"
 
     public PackageTest(String testName, String _lang) {
@@ -247,8 +247,8 @@
         resourcePrefix = propName;
     }
 
-	public void testLang() throws Exception{
-	    check(lang);
-	}
+    public void testLang() throws Exception{
+        check(lang);
+    }
 
 }

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java Sun May 10 18:19:28 2009
@@ -42,9 +42,9 @@
             res.sampleStart();
             Thread.sleep(110); // Needs to be greater than the minimum to allow for boundary errors
             res.sampleEnd();
-        	long time = res.getTime();
+            long time = res.getTime();
             if(time < 100){
-				fail("Sample time should be >=100, actual "+time);
+                fail("Sample time should be >=100, actual "+time);
             }
         }
 
@@ -103,10 +103,10 @@
         }
 
         public void testSubResults() throws Exception {
-        	// This test tries to emulate a http sample, with two
-        	// subsamples, representing images that are downloaded for the
-        	// page representing the first sample.
-        	
+            // This test tries to emulate a http sample, with two
+            // subsamples, representing images that are downloaded for the
+            // page representing the first sample.
+            
             // Sample that will get two sub results, simulates a web page load 
             SampleResult resWithSubResults = new SampleResult();            
 
@@ -119,7 +119,7 @@
             resWithSubResults.setSuccessful(true);
             resWithSubResults.sampleEnd();
             long sampleWithSubResultsTime = resWithSubResults.getTime();
-        	
+            
             // Sample with no sub results, simulates an image download
             SampleResult resNoSubResults1 = new SampleResult();            
             resNoSubResults1.sampleStart();
@@ -167,10 +167,10 @@
             // Check the sample times
             long allsamplesTime = sampleWithSubResultsTime + sample1Time + sample2Time;
             if (totalTime < allsamplesTime) {
-            	fail("Total: "+totalTime+" < sum(samples): "+ allsamplesTime);
+                fail("Total: "+totalTime+" < sum(samples): "+ allsamplesTime);
             }
             if (totalTime > overallTime) {
-            	fail("Total: "+totalTime+" > overall time: "+ overallTime);
+                fail("Total: "+totalTime+" > overall time: "+ overallTime);
             }
             
             // Check that calculator gets the correct statistics from the sample
@@ -186,40 +186,40 @@
         // TODO some more invalid sequence tests needed
         
         public void testEncodingAndType() throws Exception {
-        	// check default
-        	SampleResult res = new SampleResult();
-        	assertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());
-        	assertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());
-        	assertEquals("DataType should be blank","",res.getDataType());
-        	assertNull(res.getDataEncodingNoDefault());
-        	
-        	// check null changes nothing
-        	res.setEncodingAndType(null);
-        	assertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());
-        	assertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());
-        	assertEquals("DataType should be blank","",res.getDataType());
-        	assertNull(res.getDataEncodingNoDefault());
-
-        	// check no charset
-        	res.setEncodingAndType("text/html");
-        	assertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());
-        	assertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());
-        	assertEquals("text",res.getDataType());
-        	assertNull(res.getDataEncodingNoDefault());
-
-        	// Check unquoted charset
-        	res.setEncodingAndType("text/html; charset=aBcd");
-        	assertEquals("aBcd",res.getDataEncodingWithDefault());
-        	assertEquals("aBcd",res.getDataEncodingNoDefault());
-        	assertEquals("aBcd",res.getDataEncoding());
-        	assertEquals("text",res.getDataType());
-
-        	// Check quoted charset
-        	res.setEncodingAndType("text/html; charset=\"aBCd\"");
-        	assertEquals("aBCd",res.getDataEncodingWithDefault());
-        	assertEquals("aBCd",res.getDataEncodingNoDefault());
-        	assertEquals("aBCd",res.getDataEncoding());
-        	assertEquals("text",res.getDataType());        	
+            // check default
+            SampleResult res = new SampleResult();
+            assertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());
+            assertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());
+            assertEquals("DataType should be blank","",res.getDataType());
+            assertNull(res.getDataEncodingNoDefault());
+            
+            // check null changes nothing
+            res.setEncodingAndType(null);
+            assertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());
+            assertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());
+            assertEquals("DataType should be blank","",res.getDataType());
+            assertNull(res.getDataEncodingNoDefault());
+
+            // check no charset
+            res.setEncodingAndType("text/html");
+            assertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());
+            assertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());
+            assertEquals("text",res.getDataType());
+            assertNull(res.getDataEncodingNoDefault());
+
+            // Check unquoted charset
+            res.setEncodingAndType("text/html; charset=aBcd");
+            assertEquals("aBcd",res.getDataEncodingWithDefault());
+            assertEquals("aBcd",res.getDataEncodingNoDefault());
+            assertEquals("aBcd",res.getDataEncoding());
+            assertEquals("text",res.getDataType());
+
+            // Check quoted charset
+            res.setEncodingAndType("text/html; charset=\"aBCd\"");
+            assertEquals("aBCd",res.getDataEncodingWithDefault());
+            assertEquals("aBCd",res.getDataEncodingNoDefault());
+            assertEquals("aBCd",res.getDataEncoding());
+            assertEquals("text",res.getDataType());         
         }
 }
 

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/save/TestCSVSaveService.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/save/TestCSVSaveService.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/save/TestCSVSaveService.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/save/TestCSVSaveService.java Sun May 10 18:19:28 2009
@@ -26,14 +26,14 @@
 
 public class TestCSVSaveService extends JMeterTestCase {
 
-	public TestCSVSaveService(String name) {
-		super(name);
-	}
-	
-	private void checkSplitString(String input, char delim, String []expected) throws Exception {
-        String out[] = CSVSaveService.csvSplitString(input, delim);	    
+    public TestCSVSaveService(String name) {
+        super(name);
+    }
+    
+    private void checkSplitString(String input, char delim, String []expected) throws Exception {
+        String out[] = CSVSaveService.csvSplitString(input, delim);     
         checkStrings(expected, out);
-	}
+    }
 
     private void checkStrings(String[] expected, String[] out) {
         assertEquals("Incorrect number of strings returned",expected.length, out.length);
@@ -41,15 +41,15 @@
            assertEquals("Incorrect entry returned",expected[i], out[i]);
         }
     }
-	
-	// This is what JOrphanUtils.split() does
-	public void testSplitEmpty() throws Exception {
+    
+    // This is what JOrphanUtils.split() does
+    public void testSplitEmpty() throws Exception {
         checkSplitString("",         ',', new String[]{});    
-	}
-	
-	// These tests should agree with those for JOrphanUtils.split() as far as possible
-	
-	public void testSplitUnquoted() throws Exception {
+    }
+    
+    // These tests should agree with those for JOrphanUtils.split() as far as possible
+    
+    public void testSplitUnquoted() throws Exception {
         checkSplitString("a",         ',', new String[]{"a"});
         checkSplitString("a,bc,d,e", ',', new String[]{"a","bc","d","e"});
         checkSplitString(",bc,d,e",  ',', new String[]{"","bc","d","e"});

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/save/TestSaveService.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/save/TestSaveService.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/save/TestSaveService.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/save/TestSaveService.java Sun May 10 18:19:28 2009
@@ -30,27 +30,27 @@
 import org.apache.jorphan.collections.HashTree;
 
 public class TestSaveService extends JMeterTestCase {
-	private static final String[] FILES = new String[] {
-	    "AssertionTestPlan.jmx",
-	    "AuthManagerTestPlan.jmx",
-		"HeaderManagerTestPlan.jmx",
-		"InterleaveTestPlan2.jmx", 
-		"InterleaveTestPlan.jmx",
-		"LoopTestPlan.jmx",
-		"Modification Manager.jmx",
-		"OnceOnlyTestPlan.jmx",
-		"proxy.jmx",
-		"ProxyServerTestPlan.jmx",
-		"SimpleTestPlan.jmx",
-		"GuiTest.jmx", 
-		"GuiTest231.jmx",
-		};
-
-	private static final boolean saveOut = JMeterUtils.getPropDefault("testsaveservice.saveout", false);
-
-	public TestSaveService(String name) {
-		super(name);
-	}
+    private static final String[] FILES = new String[] {
+        "AssertionTestPlan.jmx",
+        "AuthManagerTestPlan.jmx",
+        "HeaderManagerTestPlan.jmx",
+        "InterleaveTestPlan2.jmx", 
+        "InterleaveTestPlan.jmx",
+        "LoopTestPlan.jmx",
+        "Modification Manager.jmx",
+        "OnceOnlyTestPlan.jmx",
+        "proxy.jmx",
+        "ProxyServerTestPlan.jmx",
+        "SimpleTestPlan.jmx",
+        "GuiTest.jmx", 
+        "GuiTest231.jmx",
+        };
+
+    private static final boolean saveOut = JMeterUtils.getPropDefault("testsaveservice.saveout", false);
+
+    public TestSaveService(String name) {
+        super(name);
+    }
     public void testPropfile() throws Exception {
         assertTrue("Property Version mismatch", SaveService.checkPropertyVersion());            
         assertTrue("Property File Version mismatch", SaveService.checkFileVersion());
@@ -60,32 +60,32 @@
         assertTrue("Unexpected version found", SaveService.checkVersions());
     }
 
-	public void testLoadAndSave() throws Exception {
-		byte[] original = new byte[1000000];
+    public void testLoadAndSave() throws Exception {
+        byte[] original = new byte[1000000];
 
-		boolean failed = false; // Did a test fail?
+        boolean failed = false; // Did a test fail?
 
-		for (int i = 0; i < FILES.length; i++) {
-			InputStream in = new FileInputStream(new File("testfiles/" + FILES[i]));
-			int len = in.read(original);
+        for (int i = 0; i < FILES.length; i++) {
+            InputStream in = new FileInputStream(new File("testfiles/" + FILES[i]));
+            int len = in.read(original);
 
-			in.close();
+            in.close();
 
-			in = new ByteArrayInputStream(original, 0, len);
-			HashTree tree = SaveService.loadTree(in);
+            in = new ByteArrayInputStream(original, 0, len);
+            HashTree tree = SaveService.loadTree(in);
 
-			in.close();
+            in.close();
 
-			ByteArrayOutputStream out = new ByteArrayOutputStream(1000000);
+            ByteArrayOutputStream out = new ByteArrayOutputStream(1000000);
 
-			SaveService.saveTree(tree, out);
-			out.close(); // Make sure all the data is flushed out
+            SaveService.saveTree(tree, out);
+            out.close(); // Make sure all the data is flushed out
 
-			// We only check the length of the result. Comparing the
-			// actual result (out.toByteArray==original) will usually
-			// fail, because the order of the properties within each
-			// test element may change. Comparing the lengths should be
-			// enough to detect most problem cases...
+            // We only check the length of the result. Comparing the
+            // actual result (out.toByteArray==original) will usually
+            // fail, because the order of the properties within each
+            // test element may change. Comparing the lengths should be
+            // enough to detect most problem cases...
             int outsz=out.size();
             // Allow for input in CRLF and output in LF only
             int lines=0;
@@ -95,30 +95,30 @@
                     lines++;
                 }
             }
-			if (len != outsz && len != outsz+lines) {
-				failed = true;
-				System.out.println();
-				System.out.println("Loading file testfiles/" + FILES[i] + " and "
-						+ "saving it back changes its size from " + len + " to " + outsz + ".");
+            if (len != outsz && len != outsz+lines) {
+                failed = true;
+                System.out.println();
+                System.out.println("Loading file testfiles/" + FILES[i] + " and "
+                        + "saving it back changes its size from " + len + " to " + outsz + ".");
                 System.out.println("Diff "+(len-outsz)+" lines "+lines);
-				if (saveOut) {
-					String outfile = "testfiles/" + FILES[i] + ".out";
-					System.out.println("Write " + outfile);
-					FileOutputStream outf = new FileOutputStream(new File(outfile));
-					outf.write(out.toByteArray());
-					outf.close();
-					System.out.println("Wrote " + outfile);
-				}
-			}
-
-			// Note this test will fail if a property is added or
-			// removed to any of the components used in the test
-			// files. The way to solve this is to appropriately change
-			// the test file.
-		}
-		if (failed) // TODO make these separate tests?
-		{
-			fail("One or more failures detected");
-		}
-	}
+                if (saveOut) {
+                    String outfile = "testfiles/" + FILES[i] + ".out";
+                    System.out.println("Write " + outfile);
+                    FileOutputStream outf = new FileOutputStream(new File(outfile));
+                    outf.write(out.toByteArray());
+                    outf.close();
+                    System.out.println("Wrote " + outfile);
+                }
+            }
+
+            // Note this test will fail if a property is added or
+            // removed to any of the components used in the test
+            // files. The way to solve this is to appropriately change
+            // the test file.
+        }
+        if (failed) // TODO make these separate tests?
+        {
+            fail("One or more failures detected");
+        }
+    }
 }

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/PackageTest.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/PackageTest.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/PackageTest.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/PackageTest.java Sun May 10 18:19:28 2009
@@ -47,171 +47,171 @@
  * 
  */
 public class PackageTest extends JMeterTestCase {
-	private static final Logger log = LoggingManager.getLoggerForClass();
+    private static final Logger log = LoggingManager.getLoggerForClass();
 
-	private ResourceBundle defaultBundle;
+    private ResourceBundle defaultBundle;
 
-	private Class testBeanClass;
+    private Class testBeanClass;
 
-	// ResourceBundle i18nEdit=
-	// ResourceBundle.getBundle("org.apache.jmeter.resources.i18nedit");
-	private static final Locale defaultLocale = new Locale("en",""); // i18nEdit.getString("locale.default");
-
-	// TODO: find a clean way to get these from i18nedit.properties
-
-	private static final Locale[] locales = new Locale[] {
-	// new Locale("de"), // No resources yet
-			new Locale("ja",""),
-			// new Locale("no",""), // No resources yet
-			// new Locale("fr",""), // No resources yet
-			// new Locale("zh","CN"), //No resources yet
-			new Locale("zh", "TW") };
-
-	private Locale testLocale;
-
-	private PackageTest(Class testBeanClass, Locale locale, ResourceBundle defaultBundle) {
-		super(testBeanClass.getName() + " - " + locale.getLanguage() + " - " + locale.getCountry());
-		this.testBeanClass = testBeanClass;
-		this.testLocale = locale;
-		this.defaultBundle = defaultBundle;
-	}
-
-	private PackageTest(String name){
-	    super(name);
-	}
-	
-	BeanInfo beanInfo;
-
-	ResourceBundle bundle;
-
-	public void setUp() {
-	    if (testLocale == null) {
-	        return;// errorDetected()
-	    }
-		JMeterUtils.setLocale(testLocale);
-		Introspector.flushFromCaches(testBeanClass);
-		try {
-			beanInfo = Introspector.getBeanInfo(testBeanClass);
-			bundle = (ResourceBundle) beanInfo.getBeanDescriptor().getValue(GenericTestBeanCustomizer.RESOURCE_BUNDLE);
-		} catch (IntrospectionException e) {
-			log.error("Can't get beanInfo for " + testBeanClass.getName(), e);
-			throw new Error(e.toString()); // Programming error. Don't continue.
-		}
-		if (bundle == null) {
-			throw new Error("This can't happen!");
-		}
-	}
-
-	public void tearDown() {
-		JMeterUtils.setLocale(Locale.getDefault());
-	}
+    // ResourceBundle i18nEdit=
+    // ResourceBundle.getBundle("org.apache.jmeter.resources.i18nedit");
+    private static final Locale defaultLocale = new Locale("en",""); // i18nEdit.getString("locale.default");
 
-	public void runTest() throws Throwable {
+    // TODO: find a clean way to get these from i18nedit.properties
+
+    private static final Locale[] locales = new Locale[] {
+    // new Locale("de"), // No resources yet
+            new Locale("ja",""),
+            // new Locale("no",""), // No resources yet
+            // new Locale("fr",""), // No resources yet
+            // new Locale("zh","CN"), //No resources yet
+            new Locale("zh", "TW") };
+
+    private Locale testLocale;
+
+    private PackageTest(Class testBeanClass, Locale locale, ResourceBundle defaultBundle) {
+        super(testBeanClass.getName() + " - " + locale.getLanguage() + " - " + locale.getCountry());
+        this.testBeanClass = testBeanClass;
+        this.testLocale = locale;
+        this.defaultBundle = defaultBundle;
+    }
+
+    private PackageTest(String name){
+        super(name);
+    }
+    
+    BeanInfo beanInfo;
+
+    ResourceBundle bundle;
+
+    public void setUp() {
+        if (testLocale == null) {
+            return;// errorDetected()
+        }
+        JMeterUtils.setLocale(testLocale);
+        Introspector.flushFromCaches(testBeanClass);
+        try {
+            beanInfo = Introspector.getBeanInfo(testBeanClass);
+            bundle = (ResourceBundle) beanInfo.getBeanDescriptor().getValue(GenericTestBeanCustomizer.RESOURCE_BUNDLE);
+        } catch (IntrospectionException e) {
+            log.error("Can't get beanInfo for " + testBeanClass.getName(), e);
+            throw new Error(e.toString()); // Programming error. Don't continue.
+        }
+        if (bundle == null) {
+            throw new Error("This can't happen!");
+        }
+    }
+
+    public void tearDown() {
+        JMeterUtils.setLocale(Locale.getDefault());
+    }
+
+    public void runTest() throws Throwable {
         if (testLocale == null) {
             super.runTest();
             return;// errorDetected()
         }
-		if (bundle == defaultBundle) {
-			checkAllNecessaryKeysPresent();
-		} else {
-			checkNoInventedKeys();
-		}
-	}
-
-	public void checkNoInventedKeys() {
-		// Check that all keys in the bundle are also in the default bundle:
-		for (Enumeration keys = bundle.getKeys(); keys.hasMoreElements();) {
-			String key = (String) keys.nextElement();
-			defaultBundle.getString(key);
-			// Will throw MissingResourceException if key is not there.
-		}
-	}
-
-	public void checkAllNecessaryKeysPresent() {
-		// Check that all necessary keys are there:
-
-		// displayName is always mandatory:
-		String dn = defaultBundle.getString("displayName").toUpperCase(Locale.ENGLISH);
-
-		// Skip the rest of this test for alpha/experimental beans:
-		if (dn.indexOf("(ALPHA") != -1 || dn.indexOf("(EXPERIMENTAL") != -1) {
-			return;
-		}
-
-		// Check for property- and group-related texts:
-		PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors();
-		for (int i = 0; i < descriptors.length; i++) {
-			// Skip non-editable properties, that is:
-			// Ignore hidden, read-only, and write-only properties
-			if (descriptors[i].isHidden() || descriptors[i].getReadMethod() == null
-					|| descriptors[i].getWriteMethod() == null) {
-				continue;
-			}
-			// Ignore TestElement properties which don't have an explicit
-			// editor:
-			if (TestElement.class.isAssignableFrom(descriptors[i].getPropertyType())
-					&& descriptors[i].getPropertyEditorClass() == null) {
-				continue;
-			}
-			// Done -- we're working with an editable property.
-
-			String name = descriptors[i].getName();
-
-			bundle.getString(name + ".displayName");
-			// bundle.getString(name+".shortDescription"); NOT MANDATORY
-
-			String group = (String) descriptors[i].getValue(GenericTestBeanCustomizer.GROUP);
-			if (group != null) {
-				bundle.getString( group + ".displayName");
-			}
-		}
-	}
+        if (bundle == defaultBundle) {
+            checkAllNecessaryKeysPresent();
+        } else {
+            checkNoInventedKeys();
+        }
+    }
+
+    public void checkNoInventedKeys() {
+        // Check that all keys in the bundle are also in the default bundle:
+        for (Enumeration keys = bundle.getKeys(); keys.hasMoreElements();) {
+            String key = (String) keys.nextElement();
+            defaultBundle.getString(key);
+            // Will throw MissingResourceException if key is not there.
+        }
+    }
+
+    public void checkAllNecessaryKeysPresent() {
+        // Check that all necessary keys are there:
+
+        // displayName is always mandatory:
+        String dn = defaultBundle.getString("displayName").toUpperCase(Locale.ENGLISH);
+
+        // Skip the rest of this test for alpha/experimental beans:
+        if (dn.indexOf("(ALPHA") != -1 || dn.indexOf("(EXPERIMENTAL") != -1) {
+            return;
+        }
+
+        // Check for property- and group-related texts:
+        PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors();
+        for (int i = 0; i < descriptors.length; i++) {
+            // Skip non-editable properties, that is:
+            // Ignore hidden, read-only, and write-only properties
+            if (descriptors[i].isHidden() || descriptors[i].getReadMethod() == null
+                    || descriptors[i].getWriteMethod() == null) {
+                continue;
+            }
+            // Ignore TestElement properties which don't have an explicit
+            // editor:
+            if (TestElement.class.isAssignableFrom(descriptors[i].getPropertyType())
+                    && descriptors[i].getPropertyEditorClass() == null) {
+                continue;
+            }
+            // Done -- we're working with an editable property.
 
-	public static Test suite() throws Exception {
-		TestSuite suite = new TestSuite("Bean Resource Test Suite");
+            String name = descriptors[i].getName();
 
-		Iterator iter = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] { TestBean.class })
-				.iterator();
+            bundle.getString(name + ".displayName");
+            // bundle.getString(name+".shortDescription"); NOT MANDATORY
 
-		boolean errorDetected = false;
+            String group = (String) descriptors[i].getValue(GenericTestBeanCustomizer.GROUP);
+            if (group != null) {
+                bundle.getString( group + ".displayName");
+            }
+        }
+    }
+
+    public static Test suite() throws Exception {
+        TestSuite suite = new TestSuite("Bean Resource Test Suite");
+
+        Iterator iter = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] { TestBean.class })
+                .iterator();
+
+        boolean errorDetected = false;
         JMeterUtils.setLocale(defaultLocale);
-		while (iter.hasNext()) {
-			String className = (String) iter.next();
-			Class testBeanClass = Class.forName(className);
-			ResourceBundle defaultBundle = null;
-			try {
-				defaultBundle = (ResourceBundle) Introspector.getBeanInfo(testBeanClass).getBeanDescriptor().getValue(
-						GenericTestBeanCustomizer.RESOURCE_BUNDLE);
-			} catch (IntrospectionException e) {
-				log.error("Can't get beanInfo for " + testBeanClass.getName(), e);
-				throw new Error(e.toString()); // Programming error. Don't
-												// continue.
-			}
-
-			if (defaultBundle == null) {
-				if (className.startsWith("org.apache.jmeter.examples.")) {
-					log.info("No default bundle found for " + className);
-					continue;
-				}
+        while (iter.hasNext()) {
+            String className = (String) iter.next();
+            Class testBeanClass = Class.forName(className);
+            ResourceBundle defaultBundle = null;
+            try {
+                defaultBundle = (ResourceBundle) Introspector.getBeanInfo(testBeanClass).getBeanDescriptor().getValue(
+                        GenericTestBeanCustomizer.RESOURCE_BUNDLE);
+            } catch (IntrospectionException e) {
+                log.error("Can't get beanInfo for " + testBeanClass.getName(), e);
+                throw new Error(e.toString()); // Programming error. Don't
+                                                // continue.
+            }
+
+            if (defaultBundle == null) {
+                if (className.startsWith("org.apache.jmeter.examples.")) {
+                    log.info("No default bundle found for " + className);
+                    continue;
+                }
                 errorDetected=true;
                 log.error("No default bundle found for " + className);
-				//throw new Error("No default bundle for class " + className);
+                //throw new Error("No default bundle for class " + className);
                 continue;
-			}
+            }
 
-			suite.addTest(new PackageTest(testBeanClass, defaultLocale, defaultBundle));
+            suite.addTest(new PackageTest(testBeanClass, defaultLocale, defaultBundle));
 
-			for (int i = 0; i < locales.length; i++) {
-				suite.addTest(new PackageTest(testBeanClass, locales[i], defaultBundle));
-			}
-		}
-
-		if (errorDetected)
-		{
-		    suite.addTest(new PackageTest("errorDetected"));
-		}
-		return suite;
-	}
+            for (int i = 0; i < locales.length; i++) {
+                suite.addTest(new PackageTest(testBeanClass, locales[i], defaultBundle));
+            }
+        }
+
+        if (errorDetected)
+        {
+            suite.addTest(new PackageTest("errorDetected"));
+        }
+        return suite;
+    }
 
     public void errorDetected(){
         fail("One or more errors detected - see log file");

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestBooleanPropertyEditor.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestBooleanPropertyEditor.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestBooleanPropertyEditor.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestBooleanPropertyEditor.java Sun May 10 18:19:28 2009
@@ -25,9 +25,9 @@
  * 
  */
 public class TestBooleanPropertyEditor extends junit.framework.TestCase {
-		public TestBooleanPropertyEditor(String name) {
-			super(name);
-		}
+        public TestBooleanPropertyEditor(String name) {
+            super(name);
+        }
 
         public void testBooleanEditor(){
             PropertyEditor propertyEditor = PropertyEditorManager.findEditor(boolean.class);

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestComboStringEditor.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestComboStringEditor.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestComboStringEditor.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestComboStringEditor.java Sun May 10 18:19:28 2009
@@ -17,39 +17,39 @@
 package org.apache.jmeter.testbeans.gui;
 
 public class TestComboStringEditor extends junit.framework.TestCase {
-		public TestComboStringEditor(String name) {
-			super(name);
-		}
-
-		private void testSetGet(ComboStringEditor e, Object value) throws Exception {
-			e.setValue(value);
-			assertEquals(value, e.getValue());
-		}
-
-		private void testSetGetAsText(ComboStringEditor e, String text) throws Exception {
-			e.setAsText(text);
-			assertEquals(text, e.getAsText());
-		}
-
-		public void testSetGet() throws Exception {
-			ComboStringEditor e = new ComboStringEditor();
-
-			testSetGet(e, "any string");
-			testSetGet(e, "");
-			testSetGet(e, null);
-			testSetGet(e, "${var}");
-		}
-
-		public void testSetGetAsText() throws Exception {
-			ComboStringEditor e = new ComboStringEditor();
-
-			testSetGetAsText(e, "any string");
-			testSetGetAsText(e, "");
-			testSetGetAsText(e, null);
-			testSetGetAsText(e, "${var}");
-
-			// Check "Undefined" does not become a "reserved word":
-			e.setAsText(ComboStringEditor.UNDEFINED.toString());
-			assertNotNull(e.getAsText());
-		}
+        public TestComboStringEditor(String name) {
+            super(name);
+        }
+
+        private void testSetGet(ComboStringEditor e, Object value) throws Exception {
+            e.setValue(value);
+            assertEquals(value, e.getValue());
+        }
+
+        private void testSetGetAsText(ComboStringEditor e, String text) throws Exception {
+            e.setAsText(text);
+            assertEquals(text, e.getAsText());
+        }
+
+        public void testSetGet() throws Exception {
+            ComboStringEditor e = new ComboStringEditor();
+
+            testSetGet(e, "any string");
+            testSetGet(e, "");
+            testSetGet(e, null);
+            testSetGet(e, "${var}");
+        }
+
+        public void testSetGetAsText() throws Exception {
+            ComboStringEditor e = new ComboStringEditor();
+
+            testSetGetAsText(e, "any string");
+            testSetGetAsText(e, "");
+            testSetGetAsText(e, null);
+            testSetGetAsText(e, "${var}");
+
+            // Check "Undefined" does not become a "reserved word":
+            e.setAsText(ComboStringEditor.UNDEFINED.toString());
+            assertNotNull(e.getAsText());
+        }
 }
\ No newline at end of file

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestFieldStringEditor.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestFieldStringEditor.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestFieldStringEditor.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/TestFieldStringEditor.java Sun May 10 18:19:28 2009
@@ -18,33 +18,33 @@
 
 
 public class TestFieldStringEditor extends junit.framework.TestCase {
-		public TestFieldStringEditor(String name) {
-			super(name);
-		}
-
-		private void testSetGet(ComboStringEditor e, Object value) throws Exception {
-			e.setValue(value);
-			assertEquals(value, e.getValue());
-		}
-
-		private void testSetGetAsText(ComboStringEditor e, String text) throws Exception {
-			e.setAsText(text);
-			assertEquals(text, e.getAsText());
-		}
-
-		public void testSetGet() throws Exception {
-			ComboStringEditor e = new ComboStringEditor();
-
-			testSetGet(e, "any string");
-			testSetGet(e, "");
-			testSetGet(e, "${var}");
-		}
-
-		public void testSetGetAsText() throws Exception {
-			ComboStringEditor e = new ComboStringEditor();
-
-			testSetGetAsText(e, "any string");
-			testSetGetAsText(e, "");
-			testSetGetAsText(e, "${var}");
-		}
+        public TestFieldStringEditor(String name) {
+            super(name);
+        }
+
+        private void testSetGet(ComboStringEditor e, Object value) throws Exception {
+            e.setValue(value);
+            assertEquals(value, e.getValue());
+        }
+
+        private void testSetGetAsText(ComboStringEditor e, String text) throws Exception {
+            e.setAsText(text);
+            assertEquals(text, e.getAsText());
+        }
+
+        public void testSetGet() throws Exception {
+            ComboStringEditor e = new ComboStringEditor();
+
+            testSetGet(e, "any string");
+            testSetGet(e, "");
+            testSetGet(e, "${var}");
+        }
+
+        public void testSetGetAsText() throws Exception {
+            ComboStringEditor e = new ComboStringEditor();
+
+            testSetGetAsText(e, "any string");
+            testSetGetAsText(e, "");
+            testSetGetAsText(e, "${var}");
+        }
 }
\ No newline at end of file

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/testelement/BarChartTest.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/testelement/BarChartTest.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/testelement/BarChartTest.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/testelement/BarChartTest.java Sun May 10 18:19:28 2009
@@ -26,15 +26,15 @@
 import org.apache.log.Logger;
 
 public class BarChartTest extends JMeterTestCase {
-	
-	private static final Logger log = LoggingManager.getLoggerForClass();
+    
+    private static final Logger log = LoggingManager.getLoggerForClass();
 
-	/**
-	 * @param arg0
-	 */
-	public BarChartTest(String arg0) {
-		super(arg0);
-	}
+    /**
+     * @param arg0
+     */
+    public BarChartTest(String arg0) {
+        super(arg0);
+    }
 
     public void testGenerateBarChart() {
         log.info("jtl version=" + JMeterUtils.getProperty("file_format.testlog"));

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/testelement/LineGraphTest.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/testelement/LineGraphTest.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/testelement/LineGraphTest.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/testelement/LineGraphTest.java Sun May 10 18:19:28 2009
@@ -27,14 +27,14 @@
 
 public class LineGraphTest extends JMeterTestCase {
 
-	private static final Logger log = LoggingManager.getLoggerForClass();
+    private static final Logger log = LoggingManager.getLoggerForClass();
 
-	/**
-	 * @param arg0
-	 */
-	public LineGraphTest(String arg0) {
-		super(arg0);
-	}
+    /**
+     * @param arg0
+     */
+    public LineGraphTest(String arg0) {
+        super(arg0);
+    }
 
     public void testGenerateLineChart() {
         log.info("jtl version=" + JMeterUtils.getProperty("file_format.testlog"));

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/testelement/PackageTest.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/testelement/PackageTest.java?rev=773382&r1=773381&r2=773382&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/testelement/PackageTest.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/testelement/PackageTest.java Sun May 10 18:19:28 2009
@@ -32,47 +32,47 @@
 import org.apache.jmeter.testelement.property.TestElementProperty;
 
 public class PackageTest extends TestCase {
-	public PackageTest(String arg0) {
-		super(arg0);
-	}
+    public PackageTest(String arg0) {
+        super(arg0);
+    }
 
-	public void testRecovery() throws Exception {
-		ConfigTestElement config = new ConfigTestElement();
-		config.addProperty(new StringProperty("name", "config"));
-		config.setRunningVersion(true);
-		LoginConfig loginConfig = new LoginConfig();
-		loginConfig.setUsername("user1");
-		loginConfig.setPassword("pass1");
-		assertTrue(config.getProperty("login") instanceof NullProperty);
-		// This test should work whether or not all Nulls are equal
-		assertEquals(new NullProperty("login"), config.getProperty("login"));
-		config.addProperty(new TestElementProperty("login", loginConfig));
-		assertEquals(loginConfig.toString(), config.getPropertyAsString("login"));
-		config.recoverRunningVersion();
-		assertTrue(config.getProperty("login") instanceof NullProperty);
-		assertEquals(new NullProperty("login"), config.getProperty("login"));
-	}
+    public void testRecovery() throws Exception {
+        ConfigTestElement config = new ConfigTestElement();
+        config.addProperty(new StringProperty("name", "config"));
+        config.setRunningVersion(true);
+        LoginConfig loginConfig = new LoginConfig();
+        loginConfig.setUsername("user1");
+        loginConfig.setPassword("pass1");
+        assertTrue(config.getProperty("login") instanceof NullProperty);
+        // This test should work whether or not all Nulls are equal
+        assertEquals(new NullProperty("login"), config.getProperty("login"));
+        config.addProperty(new TestElementProperty("login", loginConfig));
+        assertEquals(loginConfig.toString(), config.getPropertyAsString("login"));
+        config.recoverRunningVersion();
+        assertTrue(config.getProperty("login") instanceof NullProperty);
+        assertEquals(new NullProperty("login"), config.getProperty("login"));
+    }
 
-	public void testArguments() throws Exception {
-		Arguments args = new Arguments();
-		args.addArgument("arg1", "val1", "=");
-		TestElementProperty prop = new TestElementProperty("args", args);
-		ConfigTestElement te = new ConfigTestElement();
-		te.addProperty(prop);
-		te.setRunningVersion(true);
-		Arguments config = new Arguments();
-		config.addArgument("config1", "configValue", "=");
-		TestElementProperty configProp = new TestElementProperty("args", config);
-		ConfigTestElement te2 = new ConfigTestElement();
-		te2.addProperty(configProp);
-		te.addTestElement(te2);
-		assertEquals(2, args.getArgumentCount());
-		assertEquals("config1=configValue", args.getArgument(1).toString());
-		te.recoverRunningVersion();
-		te.addTestElement(te2);
-		assertEquals(2, args.getArgumentCount());
-		assertEquals("config1=configValue", args.getArgument(1).toString());
+    public void testArguments() throws Exception {
+        Arguments args = new Arguments();
+        args.addArgument("arg1", "val1", "=");
+        TestElementProperty prop = new TestElementProperty("args", args);
+        ConfigTestElement te = new ConfigTestElement();
+        te.addProperty(prop);
+        te.setRunningVersion(true);
+        Arguments config = new Arguments();
+        config.addArgument("config1", "configValue", "=");
+        TestElementProperty configProp = new TestElementProperty("args", config);
+        ConfigTestElement te2 = new ConfigTestElement();
+        te2.addProperty(configProp);
+        te.addTestElement(te2);
+        assertEquals(2, args.getArgumentCount());
+        assertEquals("config1=configValue", args.getArgument(1).toString());
+        te.recoverRunningVersion();
+        te.addTestElement(te2);
+        assertEquals(2, args.getArgumentCount());
+        assertEquals("config1=configValue", args.getArgument(1).toString());
 
-	}
+    }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org