PoseidasCoreConfigForm extends AbstractConfigurationLoader { public boolean loadConfiguration(final File poseidasXml) { return loadConfiguration(poseidasXml, ""); } PoseidasCoreConfigForm(); boolean loadConfiguration(final File poseidasXml); boolean loadConfiguration(final File poseidasXml, String entityIdInt); @Override boolean loadConfiguration(MultipartFile configurationFile); void save(String directory); void setPoseidasConfigXmlFile(MultipartFile poseidasConfigXmlFile); static final int UNIT; static final int LENGTH; static final int SESSION_MAX_PENDING_REQUESTS; static final int HOURS_REFRESH_BEFORE_EXPIRE; }
@Test void testReadPoseidasXmlConfiguration() { URL poseidasXmlUrl = getPoseidasXmlFilePath(CONFIG_DIR_SUCCESS); PoseidasCoreConfiguration poseidasCoreConfiguration = getPoseidasCoreConfiguration(poseidasXmlUrl); PoseidasCoreConfigForm poseidasCoreConfigForm = new PoseidasCoreConfigForm(); poseidasCoreConfigForm.loadConfiguration(new File(poseidasXmlUrl.getFile())); final String serverUrl = "https: EQUAL_NULL_CHECK.accept(serverUrl, poseidasCoreConfiguration.getServerUrl()); EQUAL_NULL_CHECK.accept(poseidasCoreConfiguration.getServerUrl().trim(), poseidasCoreConfigForm.getCoreConfig().getServerUrl()); final int maxPendingRequests = 500; Assertions.assertEquals(maxPendingRequests, poseidasCoreConfiguration.getSessionMaxPendingRequests()); checkTimerConfigurationForConfigDir1(poseidasCoreConfiguration, poseidasCoreConfigForm); Assertions.assertTrue(poseidasCoreConfigForm.getServiceProviders().size() == 1); Assertions.assertNotNull(poseidasCoreConfigForm.getServiceProviders().get(0)); Assertions.assertEquals(1, poseidasCoreConfiguration.getServiceProvider().size()); checkThatServiceProviderTypesAreEqualForConfigDir1(poseidasCoreConfiguration.getServiceProvider().get(0), poseidasCoreConfigForm.getServiceProviders().get(0)); }