@Test public void test_assertConfigurationIsValid_notSet() throws Exception { SecurityServiceConfig config = new SecurityServiceConfig(new ContainerConfiguration()); try { AdsSecurityManager.assertConfigurationIsValid(config); fail(); } catch (Exception e) { assertEquals( "La configuration ads est invalide.\n" + "Veuillez vérifier la valeur de la propriété SecurityService.config.", e.getLocalizedMessage()); } }
@Test public void test_assertConfigurationIsValid_syntaxError() throws Exception { ContainerConfiguration configuration = new ContainerConfiguration(); configuration.setParameter(SecurityServiceConfig.SECURITY_SERVICE_CONFIG, "ads:"); SecurityServiceConfig config = new SecurityServiceConfig(configuration); try { AdsSecurityManager.assertConfigurationIsValid(config); fail(); } catch (IllegalArgumentException e) { assertEquals( "La configuration ads est invalide.\n" + "Veuillez vérifier la valeur de la propriété SecurityService.config.", e.getLocalizedMessage()); } }
@Test public void test_assertConfigurationIsValid() throws Exception { SecurityServiceConfig config = new SecurityServiceConfig(createDefaultMasterConfigWithAdsValues()); AdsSecurityManager.assertConfigurationIsValid(config); }