1   /*
2    *  soapUI, copyright (C) 2004-2007 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of version 2.1 of the GNU Lesser General Public License as published by 
6    *  the Free Software Foundation.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  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  
14  package com.eviware.soapui.tools;
15  
16  import junit.framework.TestCase;
17  
18  public class TestCaseRunnerTestCase extends TestCase
19  {
20      public void testReplaceHost() throws Exception
21      {
22     	 assertEquals( "http://test2:8080/test", 
23     			 SoapUITestCaseRunner.replaceHost( "http://test:8080/test", "test2" ));
24  
25     	 assertEquals( "http://test2/test", 
26     			 SoapUITestCaseRunner.replaceHost( "http://test/test", "test2" ));
27  
28     	 assertEquals( "http://test2:8080", 
29     			 SoapUITestCaseRunner.replaceHost( "http://test:8080", "test2" ));
30  
31     	 assertEquals( "http://test2", 
32     			 SoapUITestCaseRunner.replaceHost( "http://test", "test2" ));
33     	 
34     	 assertEquals( "http://test2:8081", 
35     			 SoapUITestCaseRunner.replaceHost( "http://test:8080", "test2:8081" ));
36     	 
37     	 assertEquals( "http://test2:8081/test", 
38     			 SoapUITestCaseRunner.replaceHost( "http://test:8080/test", "test2:8081" ));
39      }
40  }