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 2005/11/25 21:09:38 UTC
svn commit: r349011 -
/jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/util/PackageTest.java
Author: sebb
Date: Fri Nov 25 12:09:33 2005
New Revision: 349011
URL: http://svn.apache.org/viewcvs?rev=349011&view=rev
Log:
Move more tests to test tree
Added:
jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/util/PackageTest.java
Added: jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/util/PackageTest.java
URL: http://svn.apache.org/viewcvs/jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/util/PackageTest.java?rev=349011&view=auto
==============================================================================
--- jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/util/PackageTest.java (added)
+++ jakarta/jmeter/branches/rel-2-1/test/src/org/apache/jmeter/util/PackageTest.java Fri Nov 25 12:09:33 2005
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.jmeter.util;
+
+import junit.framework.TestCase;
+
+public class PackageTest extends TestCase {
+
+ public PackageTest() {
+ super();
+ }
+
+ public PackageTest(String arg0) {
+ super(arg0);
+ }
+
+ public void testServer() throws Exception {
+ BeanShellServer bshs = new BeanShellServer(9876, "");
+ assertNotNull(bshs);
+ // Not sure we can test anything else here
+ }
+ public void testSub1() throws Exception {
+ String input = "http://jakarta.apache.org/jmeter/index.html";
+ String pattern = "jakarta.apache.org";
+ String sub = "${server}";
+ assertEquals("http://${server}/jmeter/index.html", StringUtilities.substitute(input, pattern, sub));
+ }
+
+ public void testSub2() throws Exception {
+ String input = "arg1=param1;param1";
+ String pattern = "param1";
+ String sub = "${value}";
+ assertEquals("arg1=${value};${value}", StringUtilities.substitute(input, pattern, sub));
+ }
+
+ public void testSub3() throws Exception {
+ String input = "jakarta.apache.org";
+ String pattern = "jakarta.apache.org";
+ String sub = "${server}";
+ assertEquals("${server}", StringUtilities.substitute(input, pattern, sub));
+ }
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org