1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.acegisecurity.providers.cas.proxy;
17
18 import junit.framework.TestCase;
19
20 import java.util.Vector;
21
22
23 /***
24 * Tests {@link AcceptAnyCasProxy}.
25 *
26 * @author Ben Alex
27 * @version $Id: AcceptAnyCasProxyTests.java,v 1.2 2005/11/17 00:56:27 benalex Exp $
28 */
29 public class AcceptAnyCasProxyTests extends TestCase {
30
31
32 public AcceptAnyCasProxyTests() {
33 super();
34 }
35
36 public AcceptAnyCasProxyTests(String arg0) {
37 super(arg0);
38 }
39
40
41
42 public final void setUp() throws Exception {
43 super.setUp();
44 }
45
46 public static void main(String[] args) {
47 junit.textui.TestRunner.run(AcceptAnyCasProxyTests.class);
48 }
49
50 public void testDoesNotAcceptNull() {
51 AcceptAnyCasProxy proxyDecider = new AcceptAnyCasProxy();
52
53 try {
54 proxyDecider.confirmProxyListTrusted(null);
55 fail("Should have thrown IllegalArgumentException");
56 } catch (IllegalArgumentException expected) {
57 assertEquals("proxyList cannot be null", expected.getMessage());
58 }
59 }
60
61 public void testNormalOperation() {
62 AcceptAnyCasProxy proxyDecider = new AcceptAnyCasProxy();
63 proxyDecider.confirmProxyListTrusted(new Vector());
64 assertTrue(true);
65 }
66 }