use of com.icthh.xm.ms.entity.service.LinkService in project xm-ms-entity by xm-online.
the class LinkResourceIntTest method setup.
@Before
public void setup() {
lepManager.beginThreadContext(ctx -> {
ctx.setValue(THREAD_CONTEXT_KEY_TENANT_CONTEXT, tenantContextHolder.getContext());
ctx.setValue(THREAD_CONTEXT_KEY_AUTH_CONTEXT, authContextHolder.getContext());
});
MockitoAnnotations.initMocks(this);
when(startUpdateDateGenerationStrategy.generateStartDate()).thenReturn(DEFAULT_START_DATE);
linkService = new LinkService(linkRepository, linkSearchRepository, permittedRepository, permittedSearchRepository, startUpdateDateGenerationStrategy);
LinkResource linkResourceMock = new LinkResource(linkService, linkResource);
this.restLinkMockMvc = MockMvcBuilders.standaloneSetup(linkResourceMock).setCustomArgumentResolvers(pageableArgumentResolver).setControllerAdvice(exceptionTranslator).setMessageConverters(jacksonMessageConverter).build();
link = createEntity(em);
}
use of com.icthh.xm.ms.entity.service.LinkService in project xm-ms-entity by xm-online.
the class LinkResourceExtendedIntTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
when(startUpdateDateGenerationStrategy.generateStartDate()).thenReturn(MOCKED_START_DATE);
linkService = new LinkService(linkRepository, linkSearchRepository, permittedRepository, permittedSearchRepository, startUpdateDateGenerationStrategy);
LinkResource linkResourceMock = new LinkResource(linkService, linkResource);
this.restLinkMockMvc = MockMvcBuilders.standaloneSetup(linkResourceMock).setCustomArgumentResolvers(pageableArgumentResolver).setControllerAdvice(exceptionTranslator).setValidator(validator).setMessageConverters(jacksonMessageConverter).build();
link = LinkResourceIntTest.createEntity(em);
}
Aggregations