Skip to content
Snippets Groups Projects
Commit dd9bac67 authored by Riabokon Stanislav(EPAM)[GCP]'s avatar Riabokon Stanislav(EPAM)[GCP]
Browse files

Merge branch 'hotfix/fix-context-unit-test' into 'integration-master'

Fix context loading during tests

See merge request go3-nrg/platform/security-and-compliance/legal!39
parents be392be3 a39bd6c5
No related branches found
No related tags found
3 merge requests!98(GONRG-1768) GCP: logging impl,!92Cloud-agnostic module `legal-reference` for Anthos (GONRG-1423),!87Fix gcp unit test
......@@ -2,15 +2,26 @@ package org.opengroup.osdu.legal;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import org.opengroup.osdu.core.common.provider.interfaces.ITenantFactory;
import org.opengroup.osdu.legal.di.TenantFactoryService;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class LegalApplicationTests {
@MockBean
TenantFactoryService tenantFactoryService;
@MockBean
ITenantFactory tenantFactory;
@Test
public void contextLoads() {
public void contextLoads() throws Exception {
Mockito.when(tenantFactoryService.getObject()).thenReturn(tenantFactory);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment