use of edu.stanford.bmir.protege.web.server.filemanager.FileContents in project webprotege by protegeproject.
the class PasswordResetMailer_IT method setUp.
@Before
public void setUp() throws Exception {
when(placeUrl.getApplicationUrl()).thenReturn(applicationUrl);
when(appNameProvider.get()).thenReturn(theAppName);
OverridableFile overridableFile = new OverridableFile(TEMPLATE_PATH, new File("/tmp/data"));
FileContents templateFile = new FileContents(overridableFile);
TemplateEngine templateEngine = new TemplateEngine(DefaultMustacheFactory::new);
ResetPasswordMailer mailer = new ResetPasswordMailer(sendMailImpl, templateEngine, templateFile, placeUrl, appNameProvider);
mailer.sendEmail(userId, emailAddress, theNewPassword, e -> {
});
verify(sendMailImpl, times(1)).sendMail(eq(singletonList(emailAddress)), eq("Your password has been reset"), bodyCaptor.capture(), any(MessagingExceptionHandler.class));
}
Aggregations