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