01: /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
02: *
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * Unless required by applicable law or agreed to in writing, software
10: * distributed under the License is distributed on an "AS IS" BASIS,
11: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: * See the License for the specific language governing permissions and
13: * limitations under the License.
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.NamedEntityObjectIdentity;
22: import org.acegisecurity.acl.basic.SimpleAclEntry;
23:
24: /**
25: * Tests {@link NullAclEntryCache}.
26: *
27: * @author Ben Alex
28: * @version $Id: NullAclEntryCacheTests.java 1496 2006-05-23 13:38:33Z benalex $
29: */
30: public class NullAclEntryCacheTests extends TestCase {
31: //~ Constructors ===================================================================================================
32:
33: public NullAclEntryCacheTests() {
34: super ();
35: }
36:
37: public NullAclEntryCacheTests(String arg0) {
38: super (arg0);
39: }
40:
41: //~ Methods ========================================================================================================
42:
43: public static void main(String[] args) {
44: junit.textui.TestRunner.run(NullAclEntryCacheTests.class);
45: }
46:
47: public final void setUp() throws Exception {
48: super .setUp();
49: }
50:
51: public void testCacheOperation() throws Exception {
52: NullAclEntryCache cache = new NullAclEntryCache();
53: cache
54: .putEntriesInCache(new BasicAclEntry[] { new SimpleAclEntry() });
55: cache.getEntriesFromCache(new NamedEntityObjectIdentity(
56: "not_used", "not_used"));
57: cache.removeEntriesFromCache(new NamedEntityObjectIdentity(
58: "not_used", "not_used"));
59: }
60: }
|