Search in sources :

Example 1 with DefaultSystemParameter

use of com.epam.pipeline.entity.utils.DefaultSystemParameter in project cloud-pipeline by epam.

the class UtilsManagerTest method testGetSystemParameters.

@Test
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Throwable.class)
public void testGetSystemParameters() throws IOException {
    File parametersJson = context.getResource("classpath:templates/default_parameters.json").getFile();
    Preference pref = SystemPreferences.LAUNCH_SYSTEM_PARAMETERS.toPreference();
    pref.setValue(Files.readAllLines(parametersJson.toPath()).stream().collect(Collectors.joining()));
    preferenceManager.update(Collections.singletonList(pref));
    List<DefaultSystemParameter> params = utilsManager.getSystemParameters();
    Assert.assertFalse(params.isEmpty());
}
Also used : DefaultSystemParameter(com.epam.pipeline.entity.utils.DefaultSystemParameter) Preference(com.epam.pipeline.entity.preference.Preference) File(java.io.File) Test(org.junit.Test) AbstractManagerTest(com.epam.pipeline.manager.AbstractManagerTest) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

Preference (com.epam.pipeline.entity.preference.Preference)1 DefaultSystemParameter (com.epam.pipeline.entity.utils.DefaultSystemParameter)1 AbstractManagerTest (com.epam.pipeline.manager.AbstractManagerTest)1 File (java.io.File)1 Test (org.junit.Test)1 Transactional (org.springframework.transaction.annotation.Transactional)1