Search in sources :

Example 6 with ContextualPreferenceVO

use of com.epam.pipeline.controller.vo.ContextualPreferenceVO in project cloud-pipeline by epam.

the class ContextualPreferenceManagerTest method upsertShouldSavePreference.

@Test
public void upsertShouldSavePreference() {
    final ContextualPreferenceVO preferenceVO = new ContextualPreferenceVO(NAME, VALUE, TYPE, toolResource);
    final ContextualPreference preference = new ContextualPreference(NAME, VALUE, TYPE, toolResource);
    when(contextualPreferenceHandler.isValid(eq(preference))).thenReturn(true);
    manager.upsert(preferenceVO);
    verify(contextualPreferenceDao).upsert(eq(preference));
}
Also used : ContextualPreference(com.epam.pipeline.entity.contextual.ContextualPreference) ContextualPreferenceVO(com.epam.pipeline.controller.vo.ContextualPreferenceVO) Test(org.junit.Test)

Aggregations

ContextualPreferenceVO (com.epam.pipeline.controller.vo.ContextualPreferenceVO)6 Test (org.junit.Test)6 ContextualPreference (com.epam.pipeline.entity.contextual.ContextualPreference)4 ContextualPreferenceExternalResource (com.epam.pipeline.entity.contextual.ContextualPreferenceExternalResource)3