@@ -0,0 +1,1809 @@
+/*%0D%0A * Copyright 2001-2005 The Apache Software Foundation.%0D%0A *%0D%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0D%0A * you may not use this file except in compliance with the License.%0D%0A * You may obtain a copy of the License at%0D%0A *%0D%0A *   http://www.apache.org/licenses/LICENSE-2.0%0D%0A *%0D%0A * Unless required by applicable law or agreed to in writing, software%0D%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0D%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0D%0A * See the License for the specific language governing permissions and%0D%0A * limitations under the License.%0D%0A * %0D%0A */%0D%0A%0D%0Apackage org.apache.jmeter.util;%0D%0A%0D%0Aimport junit.framework.TestCase;%0D%0A%0D%0Apublic class PackageTest extends TestCase %7B%0D%0A%0D%0A%09public PackageTest() %7B%0D%0A%09%09super();%0D%0A%09%7D%0D%0A%0D%0A%09public PackageTest(String arg0) %7B%0D%0A%09%09super(arg0);%0D%0A%09%7D%0D%0A%0D%0A%09public void testServer() throws Exception %7B%0D%0A%09%09BeanShellServer bshs = new BeanShellServer(9876, %22%22);%0D%0A%09%09assertNotNull(bshs);%0D%0A%09%09// Not sure we can test anything else here%0D%0A%09%7D%0D%0A%09public void testSub1() throws Exception %7B%0D%0A%09%09String input = %22http://jakarta.apache.org/jmeter/index.html%22;%0D%0A%09%09String pattern = %22jakarta.apache.org%22;%0D%0A%09%09String sub = %22$%7Bserver%7D%22;%0D%0A%09%09assertEquals(%22http://$%7Bserver%7D/jmeter/index.html%22, StringUtilities.substitute(input, pattern, sub));%0D%0A%09%7D%0D%0A%0D%0A%09public void testSub2() throws Exception %7B%0D%0A%09%09String input = %22arg1=param1;param1%22;%0D%0A%09%09String pattern = %22param1%22;%0D%0A%09%09String sub = %22$%7Bvalue%7D%22;%0D%0A%09%09assertEquals(%22arg1=$%7Bvalue%7D;$%7Bvalue%7D%22, StringUtilities.substitute(input, pattern, sub));%0D%0A%09%7D%0D%0A%0D%0A%09public void testSub3() throws Exception %7B%0D%0A%09%09String input = %22jakarta.apache.org%22;%0D%0A%09%09String pattern = %22jakarta.apache.org%22;%0D%0A%09%09String sub = %22$%7Bserver%7D%22;%0D%0A%09%09assertEquals(%22$%7Bserver%7D%22, StringUtilities.substitute(input, pattern, sub));%0D%0A%09%7D%0D%0A%0D%0A%7D%0D%0A

Move more tests to test tree