use of org.activityinfo.server.util.TemplateModule in project activityinfo by bedatadriven.
the class UpdateUserPermissionsHandlerTest method setup.
@Before
public void setup() throws TemplateModelException {
NRC = new Partner();
NRC.setId(1);
NRC.setName("NRC");
NRC.setFullName("Norwegian Refugee Council");
db.persist(NRC);
IRC = new Partner();
IRC.setId(2);
IRC.setName("IRC");
IRC.setFullName("International Rescue Committee");
db.persist(IRC);
NRC_DTO = new PartnerDTO(1, "NRC");
TemplateModule templateModule = new TemplateModule();
mailer = new MailSenderStub(templateModule.provideConfiguration(Providers.of(Domain.DEFAULT)));
handler = new UpdateUserPermissionsHandler(db.getDAO(UserDatabaseDAO.class), db.getDAO(PartnerDAO.class), db.getDAO(UserDAO.class), db.getDAO(UserPermissionDAO.class), mailer);
owner = new User();
owner.setId(99);
owner.setName("Alex");
owner.setEmail("alex@bedatadriven.com");
db.persist(owner);
Database udb = new Database(1, "PEAR");
udb.setOwner(owner);
db.persist(udb);
}
use of org.activityinfo.server.util.TemplateModule in project activityinfo by bedatadriven.
the class ViewTestCase method setUpTemplateConfig.
@BeforeClass
public static void setUpTemplateConfig() throws TemplateModelException {
TemplateModule module = new TemplateModule();
templateCfg = module.provideConfiguration(Providers.of(Domain.DEFAULT));
}
use of org.activityinfo.server.util.TemplateModule in project activityinfo by bedatadriven.
the class PostmarkMailSenderTest method setUp.
@Before
public void setUp() throws TemplateModelException {
Properties properties = new Properties();
properties.setProperty(PostmarkMailSender.POSTMARK_API_KEY, "POSTMARK_API_TEST");
DeploymentConfiguration config = new DeploymentConfiguration(properties);
TemplateModule templateModule = new TemplateModule();
sender = new PostmarkMailSender(config, templateModule.provideConfiguration(Providers.of(Domain.DEFAULT)));
}
Aggregations