X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=security%2Fjpatest%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fsecurity%2Fauthorization%2Fjpa%2FJpaAuthorizationServiceTest.java;h=a6f0ae333d791a5f0a54641af5dc1626992fab0f;hb=981d2819a828dad943b0bd4f6df818cfae4ab0df;hp=1573f4734b52efed34dc344ec45739e323c81201;hpb=b9955e5d8f0257f5304a88a790e69fc464f4a7cf;p=utils diff --git a/security/jpatest/src/test/java/org/wamblee/security/authorization/jpa/JpaAuthorizationServiceTest.java b/security/jpatest/src/test/java/org/wamblee/security/authorization/jpa/JpaAuthorizationServiceTest.java index 1573f473..a6f0ae33 100644 --- a/security/jpatest/src/test/java/org/wamblee/security/authorization/jpa/JpaAuthorizationServiceTest.java +++ b/security/jpatest/src/test/java/org/wamblee/security/authorization/jpa/JpaAuthorizationServiceTest.java @@ -15,19 +15,12 @@ */ package org.wamblee.security.authorization.jpa; -import javax.persistence.EntityManager; - import org.apache.log4j.Logger; -import org.wamblee.security.authorization.AbstractAuthorizationService; -import org.wamblee.security.authorization.AllOperation; -import org.wamblee.security.authorization.AuthorizationResult; +import org.wamblee.security.authentication.jpa.SecurityPersistenceUnit; import org.wamblee.security.authorization.AuthorizationService; import org.wamblee.security.authorization.AuthorizationServiceTest; -import org.wamblee.security.authorization.TestAuthorizationRule; import org.wamblee.support.persistence.JpaTester; import org.wamblee.support.persistence.TransactionProxyFactory; -import org.wamblee.support.persistence.JpaBuilder.JpaUnitOfWork; -import org.wamblee.usermgt.jpa.SecurityPersistenceUnit; /** * Unit test for the persistent authorization service. @@ -42,7 +35,7 @@ public class JpaAuthorizationServiceTest extends AuthorizationServiceTest { private static final String RULES_TABLE = "SEC_AUTH_RULE"; - private static final String SERVICE_RULES_TABLE = "SEC_AUTH_SVC_SEC_AUTH_RULE"; + private static final String SERVICE_RULES_TABLE = "SEC_AUTH_SVC_RULE"; private static final String OPERATIONCOND_TABLE = "SEC_OPERATION_CONDITION"; @@ -52,8 +45,6 @@ public class JpaAuthorizationServiceTest extends AuthorizationServiceTest { private JpaTester jpaTester; - private AuthorizationService authorizationService; - @Override protected void setUp() throws Exception { jpaTester = new JpaTester(new SecurityPersistenceUnit()); @@ -62,6 +53,12 @@ public class JpaAuthorizationServiceTest extends AuthorizationServiceTest { super.setUp(); } + @Override + protected void tearDown() throws Exception { + jpaTester.stop(); + super.tearDown(); + } + /* * (non-Javadoc) * @@ -75,7 +72,7 @@ public class JpaAuthorizationServiceTest extends AuthorizationServiceTest { jpaTester.getJpaBuilder(), AuthorizationService.class); JpaAuthorizationService service = new JpaAuthorizationService( "DEFAULT", factory.getTransactionScopedEntityManager(), - createUserAccessor(), 10000); + getUserAccessor(), getUserAdministration(), 10000); return factory.getProxy(service); }