use of com.epam.ta.reportportal.database.entity.project.email.ProjectEmailConfig in project commons-dao by reportportal.
the class ProjectUtils method setDefaultEmailCofiguration.
/**
* Setup default project email configuration
*
* @param project
* @return project object with default email config
*/
public static Project setDefaultEmailCofiguration(Project project) {
EmailSenderCase defaultOne = new EmailSenderCase(Lists.newArrayList(OWNER), SendCase.ALWAYS.name(), Lists.newArrayList(), Lists.newArrayList());
ProjectEmailConfig config = new ProjectEmailConfig(false, INIT_FROM, Lists.newArrayList(defaultOne));
project.getConfiguration().setEmailConfig(config);
return project;
}
use of com.epam.ta.reportportal.database.entity.project.email.ProjectEmailConfig in project commons-dao by reportportal.
the class ProjectUtilsTest method project.
private Project project() {
final Project project = new Project();
final Project.Configuration configuration = new Project.Configuration();
final ProjectEmailConfig emailConfig = new ProjectEmailConfig();
emailConfig.setEmailCases(singletonList(new EmailSenderCase(asList("user1", "user1@fake.com", "user2@fake.com", aliveUser), "ALWAYS", asList("launch"), asList("tag"))));
configuration.setEmailConfig(emailConfig);
project.setConfiguration(configuration);
return project;
}
Aggregations