use of com.epam.pipeline.manager.preference.PreferenceManager in project cloud-pipeline by epam.
the class FolderManagerGetProjectTest method setUp.
@Before
public void setUp() {
data.put(DATA_KEY_1, new PipeConfValue(DATA_TYPE_1, DATA_VALUE_1));
dataWithIndicator.put(DATA_KEY_1, new PipeConfValue(DATA_TYPE_1, PROJECT_INDICATOR_VALUE));
folder1 = initFolderWithMetadata(folder1, 1L, "folder1", null, data);
folder2 = initFolderWithMetadata(folder2, 2L, "folder2", folder1.getId(), dataWithIndicator);
folder3 = initFolderWithMetadata(folder3, 3L, "folder3", folder2.getId(), data);
Mockito.when(folderDao.loadParentFolders(Matchers.any(Long.class))).thenReturn(Stream.of(folder1, folder2, folder3).collect(Collectors.toList()));
PreferenceManager preferenceManager = mock(PreferenceManager.class);
ReflectionTestUtils.setField(folderManager, "preferenceManager", preferenceManager);
Mockito.when(preferenceManager.getPreference(SystemPreferences.UI_PROJECT_INDICATOR)).thenReturn("tag=project,other=indicator");
}
Aggregations