X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=security%2Fjpatest%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fsecurity%2Fauthorization%2Fjpa%2FJpaAuthorizationServiceTest.java;h=ea5036f2f8f08c78dcfca713958f3272dcf2ac8a;hb=cb91054f35281c6fc5619f93ff71df46bf4686b9;hp=d67e09c4fd3975d5c314077af04a41ad85b37f56;hpb=74a6cd5b71b4f668ddac54c3237511ee11e8d84e;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 d67e09c4..ea5036f2 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,20 +15,14 @@ */ package org.wamblee.security.authorization.jpa; -import static org.wamblee.security.authorization.AuthorizationResult.*; -import javax.persistence.EntityManager; +import java.util.logging.Logger; -import org.apache.log4j.Logger; -import org.wamblee.security.authorization.AllOperation; -import org.wamblee.security.authorization.AuthorizationRule; +import org.wamblee.security.authentication.jpa.SecurityPersistenceUnit; import org.wamblee.security.authorization.AuthorizationService; import org.wamblee.security.authorization.AuthorizationServiceTest; -import org.wamblee.security.authorization.DefaultAuthorizationService; -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; +import org.wamblee.test.persistence.JpaTester; +import org.wamblee.test.persistence.TransactionProxyFactory; /** * Unit test for the persistent authorization service. @@ -37,13 +31,13 @@ import org.wamblee.usermgt.jpa.SecurityPersistenceUnit; */ public class JpaAuthorizationServiceTest extends AuthorizationServiceTest { private static final Logger LOGGER = Logger - .getLogger(JpaAuthorizationServiceTest.class); + .getLogger(JpaAuthorizationServiceTest.class.getName()); private static final String SERVICE_TABLE = "SEC_AUTH_SVC"; 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"; @@ -53,8 +47,6 @@ public class JpaAuthorizationServiceTest extends AuthorizationServiceTest { private JpaTester jpaTester; - private AuthorizationService authorizationService; - @Override protected void setUp() throws Exception { jpaTester = new JpaTester(new SecurityPersistenceUnit()); @@ -82,7 +74,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); }