01: /*
02: * soapUI, copyright (C) 2004-2007 eviware.com
03: *
04: * soapUI is free software; you can redistribute it and/or modify it under the
05: * terms of version 2.1 of the GNU Lesser General Public License as published by
06: * the Free Software Foundation.
07: *
08: * soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
09: * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: * See the GNU Lesser General Public License for more details at gnu.org.
11: */
12:
13: package com.eviware.soapui.tools;
14:
15: import com.eviware.soapui.support.Tools;
16:
17: import junit.framework.TestCase;
18:
19: public class TestCaseRunnerTestCase extends TestCase {
20: public void testReplaceHost() throws Exception {
21: assertEquals("http://test2:8080/test", Tools.replaceHost(
22: "http://test:8080/test", "test2"));
23:
24: assertEquals("http://test2/test", Tools.replaceHost(
25: "http://test/test", "test2"));
26:
27: assertEquals("http://test2:8080", Tools.replaceHost(
28: "http://test:8080", "test2"));
29:
30: assertEquals("http://test2", Tools.replaceHost("http://test",
31: "test2"));
32:
33: assertEquals("http://test2:8081", Tools.replaceHost(
34: "http://test:8080", "test2:8081"));
35:
36: assertEquals("http://test2:8081/test", Tools.replaceHost(
37: "http://test:8080/test", "test2:8081"));
38: }
39: }
|