Search in sources :

Example 1 with CustomEntityService

use of com.qcadoo.model.beans.sample.CustomEntityService in project qcadoo by qcadoo.

the class EntityHookDefinitionImplTest method init.

@Before
public final void init() throws HookInitializationException {
    MockitoAnnotations.initMocks(this);
    ApplicationContext applicationContext = Mockito.mock(ApplicationContext.class);
    BDDMockito.given(applicationContext.getBean(CustomEntityService.class)).willReturn(new CustomEntityService());
    entityHookDefinitionImpl = new EntityHookDefinitionImpl("com.qcadoo.model.beans.sample.CustomEntityService", "onSave", SOME_PLUGIN_IDENTIFIER, applicationContext);
    PluginUtilsService pluginUtil = new PluginUtilsService(pluginStateResolver);
    pluginUtil.init();
}
Also used : CustomEntityService(com.qcadoo.model.beans.sample.CustomEntityService) ApplicationContext(org.springframework.context.ApplicationContext) PluginUtilsService(com.qcadoo.plugin.internal.PluginUtilsService) Before(org.junit.Before)

Aggregations

CustomEntityService (com.qcadoo.model.beans.sample.CustomEntityService)1 PluginUtilsService (com.qcadoo.plugin.internal.PluginUtilsService)1 Before (org.junit.Before)1 ApplicationContext (org.springframework.context.ApplicationContext)1