Search in sources :

Example 1 with DeviationModelDescriber

use of com.qcadoo.mes.orders.constants.deviationReasonTypes.DeviationModelDescriber in project mes by qcadoo.

the class CommonReasonTypeModelHooksTest method init.

@Before
public void init() {
    MockitoAnnotations.initMocks(this);
    commonReasonTypeModelHooks = new CommonReasonTypeModelHooks();
    deviationModelDescriber = new DeviationModelDescriber("reasonPlugin", "reasonModel", "reasonField");
    DataDefinitionService dataDefinitionService = mock(DataDefinitionService.class);
    given(dataDefinitionService.get(deviationModelDescriber.getModelPlugin(), deviationModelDescriber.getModelName())).willReturn(reasonDD);
    ReflectionTestUtils.setField(commonReasonTypeModelHooks, "dataDefinitionService", dataDefinitionService);
}
Also used : DeviationModelDescriber(com.qcadoo.mes.orders.constants.deviationReasonTypes.DeviationModelDescriber) DataDefinitionService(com.qcadoo.model.api.DataDefinitionService) Before(org.junit.Before)

Aggregations

DeviationModelDescriber (com.qcadoo.mes.orders.constants.deviationReasonTypes.DeviationModelDescriber)1 DataDefinitionService (com.qcadoo.model.api.DataDefinitionService)1 Before (org.junit.Before)1