1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.ldap.server.authz.support;
20
21 import junit.framework.Assert;
22 import junit.framework.TestCase;
23
24 /***
25 * Tests {@link OperationScope}.
26 *
27 * @author The Apache Directory Project
28 * @version $Rev: 292098 $, $Date: 2005-09-27 22:38:36 -0400 (Tue, 27 Sep 2005) $
29 *
30 */
31 public class OperationScopeTest extends TestCase
32 {
33 public void testGetName() throws Exception
34 {
35 Assert.assertEquals( "Entry", OperationScope.ENTRY.getName() );
36 Assert.assertEquals( "Attribute Type", OperationScope.ATTRIBUTE_TYPE.getName() );
37 Assert.assertEquals( "Attribute Type & Value", OperationScope.ATTRIBUTE_TYPE_AND_VALUE.getName() );
38 }
39
40 public void testGetNameAndToStringEquality()
41 {
42 Assert.assertEquals( OperationScope.ENTRY.getName(), OperationScope.ENTRY.toString() );
43 Assert.assertEquals( OperationScope.ATTRIBUTE_TYPE.getName(), OperationScope.ATTRIBUTE_TYPE.toString() );
44 Assert.assertEquals( OperationScope.ATTRIBUTE_TYPE_AND_VALUE.getName(), OperationScope.ATTRIBUTE_TYPE_AND_VALUE.toString() );
45 }
46 }