summaryrefslogtreecommitdiff
path: root/java/broker-plugins/access-control/src
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2010-06-03 21:26:15 +0000
committerMartin Ritchie <ritchiem@apache.org>2010-06-03 21:26:15 +0000
commit9bcd23b23e46bb94761611f65d1afddfb927a94a (patch)
tree2471a9200a3fcd9a2d992ae8f1f8eb110b2b9ba3 /java/broker-plugins/access-control/src
parent18fd084c0db4ac659630bc51fddebe668cd2876f (diff)
downloadqpid-python-9bcd23b23e46bb94761611f65d1afddfb927a94a.tar.gz
QPID-2632 : Ensure additional broker unit tests extend IBBC
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@951157 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker-plugins/access-control/src')
-rw-r--r--java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java b/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java
index 53485f05c5..ef541dd0a8 100644
--- a/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java
+++ b/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java
@@ -21,16 +21,15 @@
package org.apache.qpid.server.security.access.plugins;
-import junit.framework.TestCase;
import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.server.registry.ApplicationRegistry;
import org.apache.qpid.server.security.Result;
import org.apache.qpid.server.security.access.ObjectProperties;
import org.apache.qpid.server.security.access.ObjectType;
import org.apache.qpid.server.security.access.Operation;
import org.apache.qpid.server.security.access.Permission;
import org.apache.qpid.server.security.access.config.RuleSet;
+import org.apache.qpid.server.util.InternalBrokerBaseCase;
/**
* This test checks that the {@link RuleSet} object which forms the core of the access control plugin performs correctly.
@@ -40,7 +39,7 @@ import org.apache.qpid.server.security.access.config.RuleSet;
* access control mechanism is validated by checking whether operations would be authorised by calling the
* {@link RuleSet#check(String, Operation, ObjectType, ObjectProperties)} method.
*/
-public class RuleSetTest extends TestCase
+public class RuleSetTest extends InternalBrokerBaseCase
{
private RuleSet _ruleSet;
@@ -50,20 +49,18 @@ public class RuleSetTest extends TestCase
private AMQShortString _exchangeType = new AMQShortString("direct");
@Override
- public void setUp()
+ public void setUp() throws Exception
{
- // Each test will cause a new application registry and non-transitive rule set to be created
- ApplicationRegistry.getInstance();
+ super.setUp();
_ruleSet = new RuleSet();
_ruleSet.configure(RuleSet.TRANSITIVE, Boolean.FALSE);
}
@Override
- protected void tearDown() throws Exception
+ public void tearDown() throws Exception
{
- // Ensure we close the opened Registry
- ApplicationRegistry.remove();
_ruleSet.clear();
+ super.tearDown();
}
public void assertDenyGrantAllow(String identity, Operation operation, ObjectType objectType)