Search in sources :

Example 1 with XmConfigProperties

use of com.icthh.xm.commons.config.client.config.XmConfigProperties in project xm-ms-entity by xm-online.

the class MailServiceUnitTest method before.

@Before
public void before() {
    tenantConfigService = new XmEntityTenantConfigService(new XmConfigProperties(), tenantContextHolder);
    MockitoAnnotations.initMocks(this);
    when(tenantContextHolder.getTenantKey()).thenReturn("XM");
    when(tenantContextHolder.getPrivilegedContext()).thenReturn(mock(PrivilegedTenantContext.class));
    TenantContext mock = mock(TenantContext.class);
    when(mock.getTenantKey()).thenReturn(java.util.Optional.of(TenantKey.valueOf("XM")));
    when(tenantContextHolder.getContext()).thenReturn(mock);
}
Also used : XmConfigProperties(com.icthh.xm.commons.config.client.config.XmConfigProperties) XmEntityTenantConfigService(com.icthh.xm.ms.entity.config.XmEntityTenantConfigService) PrivilegedTenantContext(com.icthh.xm.commons.tenant.PrivilegedTenantContext) TenantContext(com.icthh.xm.commons.tenant.TenantContext) PrivilegedTenantContext(com.icthh.xm.commons.tenant.PrivilegedTenantContext) Before(org.junit.Before)

Aggregations

XmConfigProperties (com.icthh.xm.commons.config.client.config.XmConfigProperties)1 PrivilegedTenantContext (com.icthh.xm.commons.tenant.PrivilegedTenantContext)1 TenantContext (com.icthh.xm.commons.tenant.TenantContext)1 XmEntityTenantConfigService (com.icthh.xm.ms.entity.config.XmEntityTenantConfigService)1 Before (org.junit.Before)1