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.impl.wsdl.support.http;
14:
15: import junit.framework.TestCase;
16:
17: public class ProxyUtilsTestCase extends TestCase {
18: public void testExcludes() {
19: assertFalse(ProxyUtils.excludes(new String[] { "" },
20: "www.test.com", 8080));
21: assertTrue(ProxyUtils.excludes(new String[] { "test.com" },
22: "www.test.com", 8080));
23: assertFalse(ProxyUtils.excludes(new String[] { "test2.com" },
24: "www.test.com", 8080));
25: assertTrue(ProxyUtils.excludes(
26: new String[] { "test.com:8080" }, "www.test.com", 8080));
27: assertFalse(ProxyUtils
28: .excludes(new String[] { "test2.com:8080" },
29: "www.test.com", 8080));
30: assertFalse(ProxyUtils.excludes(
31: new String[] { "test.com:8081" }, "www.test.com", 8080));
32: assertTrue(ProxyUtils.excludes(new String[] { "test.com:8080",
33: "test.com:8081" }, "www.test.com", 8080));
34: assertTrue(ProxyUtils.excludes(new String[] { "test.com:8080",
35: "test.com" }, "www.test.com", 8080));
36: }
37: }
|