NIHVIVO-3523 Set up an empty PermissionRegistry for the unit test.
This commit is contained in:
parent
e72cd6a78b
commit
24e1c7cfd8
1 changed files with 7 additions and 2 deletions
|
@ -37,6 +37,8 @@ import edu.cornell.mannlib.vedit.beans.LoginStatusBean.AuthenticationSource;
|
||||||
import edu.cornell.mannlib.vitro.testing.AbstractTestClass;
|
import edu.cornell.mannlib.vitro.testing.AbstractTestClass;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.identifier.ActiveIdentifierBundleFactories;
|
import edu.cornell.mannlib.vitro.webapp.auth.identifier.ActiveIdentifierBundleFactories;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.identifier.common.CommonIdentifierBundleFactory;
|
import edu.cornell.mannlib.vitro.webapp.auth.identifier.common.CommonIdentifierBundleFactory;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.auth.permissions.Permission;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.auth.permissions.PermissionRegistry;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.UserAccount;
|
import edu.cornell.mannlib.vitro.webapp.beans.UserAccount;
|
||||||
import edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties;
|
import edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.authenticate.Authenticator;
|
import edu.cornell.mannlib.vitro.webapp.controller.authenticate.Authenticator;
|
||||||
|
@ -130,7 +132,7 @@ public class AuthenticateTest extends AbstractTestClass {
|
||||||
userAccountsDao.addUser(createUserFromUserInfo(OLD_STRANGER));
|
userAccountsDao.addUser(createUserFromUserInfo(OLD_STRANGER));
|
||||||
|
|
||||||
individualDao = new IndividualDaoStub();
|
individualDao = new IndividualDaoStub();
|
||||||
|
|
||||||
webappDaoFactory = new WebappDaoFactoryStub();
|
webappDaoFactory = new WebappDaoFactoryStub();
|
||||||
webappDaoFactory.setUserAccountsDao(userAccountsDao);
|
webappDaoFactory.setUserAccountsDao(userAccountsDao);
|
||||||
webappDaoFactory.setIndividualDao(individualDao);
|
webappDaoFactory.setIndividualDao(individualDao);
|
||||||
|
@ -151,12 +153,15 @@ public class AuthenticateTest extends AbstractTestClass {
|
||||||
|
|
||||||
response = new HttpServletResponseStub();
|
response = new HttpServletResponseStub();
|
||||||
|
|
||||||
|
PermissionRegistry.createRegistry(servletContext,
|
||||||
|
Collections.<Permission> emptySet());
|
||||||
|
|
||||||
auth = new Authenticate();
|
auth = new Authenticate();
|
||||||
auth.init(servletConfig);
|
auth.init(servletConfig);
|
||||||
|
|
||||||
setLoggerLevel(ConfigurationProperties.class, Level.WARN);
|
setLoggerLevel(ConfigurationProperties.class, Level.WARN);
|
||||||
new ConfigurationPropertiesStub().setBean(servletContext);
|
new ConfigurationPropertiesStub().setBean(servletContext);
|
||||||
|
|
||||||
ActiveIdentifierBundleFactories.addFactory(servletContext,
|
ActiveIdentifierBundleFactories.addFactory(servletContext,
|
||||||
new CommonIdentifierBundleFactory(servletContext));
|
new CommonIdentifierBundleFactory(servletContext));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue