From 9bcd23b23e46bb94761611f65d1afddfb927a94a Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Thu, 3 Jun 2010 21:26:15 +0000 Subject: 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 --- .../qpid/server/security/access/plugins/RuleSetTest.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'java/broker-plugins/access-control/src') 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) -- cgit v1.2.1