@Test public void testBuildWithAuthenticationDisabledSetting() { Properties props = createPropertiesFor(PropertiesBasedGreenMailConfigurationBuilder.GREENMAIL_AUTH_DISABLED, ""); GreenMailConfiguration config = new PropertiesBasedGreenMailConfigurationBuilder().build(props); assertThat(config).isNotNull(); assertThat(config.isAuthenticationDisabled()).isTrue(); }
public GreenMailConfiguration build(Properties properties) { GreenMailConfiguration configuration = new GreenMailConfiguration(); String usersParam = properties.getProperty(GREENMAIL_USERS); if (null != usersParam) { String[] usersArray = usersParam.split(","); for (String user : usersArray) { extractAndAddUser(configuration, user); } } String disabledAuthentication = properties.getProperty(GREENMAIL_AUTH_DISABLED); if (null != disabledAuthentication) { configuration.withDisabledAuthentication(); } return configuration; }
PropertiesBasedGreenMailConfigurationBuilder { public GreenMailConfiguration build(Properties properties) { GreenMailConfiguration configuration = new GreenMailConfiguration(); String usersParam = properties.getProperty(GREENMAIL_USERS); if (null != usersParam) { String[] usersArray = usersParam.split(","); for (String user : usersArray) { extractAndAddUser(configuration, user); } } String disabledAuthentication = properties.getProperty(GREENMAIL_AUTH_DISABLED); if (null != disabledAuthentication) { configuration.withDisabledAuthentication(); } return configuration; } }
PropertiesBasedGreenMailConfigurationBuilder { public GreenMailConfiguration build(Properties properties) { GreenMailConfiguration configuration = new GreenMailConfiguration(); String usersParam = properties.getProperty(GREENMAIL_USERS); if (null != usersParam) { String[] usersArray = usersParam.split(","); for (String user : usersArray) { extractAndAddUser(configuration, user); } } String disabledAuthentication = properties.getProperty(GREENMAIL_AUTH_DISABLED); if (null != disabledAuthentication) { configuration.withDisabledAuthentication(); } return configuration; }  }
PropertiesBasedGreenMailConfigurationBuilder { public GreenMailConfiguration build(Properties properties) { GreenMailConfiguration configuration = new GreenMailConfiguration(); String usersParam = properties.getProperty(GREENMAIL_USERS); if (null != usersParam) { String[] usersArray = usersParam.split(","); for (String user : usersArray) { extractAndAddUser(configuration, user); } } String disabledAuthentication = properties.getProperty(GREENMAIL_AUTH_DISABLED); if (null != disabledAuthentication) { configuration.withDisabledAuthentication(); } return configuration; }  GreenMailConfiguration build(Properties properties); }
PropertiesBasedGreenMailConfigurationBuilder { public GreenMailConfiguration build(Properties properties) { GreenMailConfiguration configuration = new GreenMailConfiguration(); String usersParam = properties.getProperty(GREENMAIL_USERS); if (null != usersParam) { String[] usersArray = usersParam.split(","); for (String user : usersArray) { extractAndAddUser(configuration, user); } } String disabledAuthentication = properties.getProperty(GREENMAIL_AUTH_DISABLED); if (null != disabledAuthentication) { configuration.withDisabledAuthentication(); } return configuration; }  GreenMailConfiguration build(Properties properties); static final String GREENMAIL_USERS; static final String GREENMAIL_AUTH_DISABLED; }