Search in sources :

Example 1 with ProjectEmailConfig

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;
}
Also used : ProjectEmailConfig(com.epam.ta.reportportal.database.entity.project.email.ProjectEmailConfig) EmailSenderCase(com.epam.ta.reportportal.database.entity.project.email.EmailSenderCase)

Example 2 with ProjectEmailConfig

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;
}
Also used : Project(com.epam.ta.reportportal.database.entity.Project) ProjectEmailConfig(com.epam.ta.reportportal.database.entity.project.email.ProjectEmailConfig) EmailSenderCase(com.epam.ta.reportportal.database.entity.project.email.EmailSenderCase)

Aggregations

EmailSenderCase (com.epam.ta.reportportal.database.entity.project.email.EmailSenderCase)2 ProjectEmailConfig (com.epam.ta.reportportal.database.entity.project.email.ProjectEmailConfig)2 Project (com.epam.ta.reportportal.database.entity.Project)1