    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 com.eviware.soapui.support.Tools;
    17
    18  import junit.framework.TestCase;
    19
    20  public class TestCaseRunnerTestCase extends TestCase
    21  {
    22      public void testReplaceHost() throws Exception
    23      {
    24     	 assertEquals( "http://test2:8080/test",
    25     			 Tools.replaceHost( "http://test:8080/test", "test2" ));
    26
    27     	 assertEquals( "http://test2/test",
    28     				 Tools.replaceHost( "http://test/test", "test2" ));
    29
    30     	 assertEquals( "http://test2:8080",
    31     				 Tools.replaceHost( "http://test:8080", "test2" ));
    32
    33     	 assertEquals( "http://test2",
    34     				 Tools.replaceHost( "http://test", "test2" ));
    35
    36     	 assertEquals( "http://test2:8081",
    37     				 Tools.replaceHost( "http://test:8080", "test2:8081" ));
    38
    39     	 assertEquals( "http://test2:8081/test",
    40     				 Tools.replaceHost( "http://test:8080/test", "test2:8081" ));
    41      }
    42  }