Search in sources :

Example 1 with SecurityUtil

use of ca.bc.gov.hlth.hnweb.security.SecurityUtil in project moh-hnweb by bcgov.

the class HL7SerializerTest method setUp.

@BeforeAll
static void setUp() throws IOException {
    mockStatic = Mockito.mockStatic(SecurityUtil.class);
    mockStatic.when(SecurityUtil::loadUserInfo).thenReturn(new UserInfo("unittest", "00000010", "hnweb-user"));
}
Also used : SecurityUtil(ca.bc.gov.hlth.hnweb.security.SecurityUtil) UserInfo(ca.bc.gov.hlth.hnweb.security.UserInfo) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 2 with SecurityUtil

use of ca.bc.gov.hlth.hnweb.security.SecurityUtil in project moh-hnweb by bcgov.

the class AuditServiceTest method setUp.

@BeforeAll
static void setUp() throws IOException {
    mockStatic = Mockito.mockStatic(SecurityUtil.class);
    mockStatic.when(SecurityUtil::loadUserInfo).thenReturn(new UserInfo("unittest", "00000010", "hnweb-user", UUID.randomUUID().toString()));
}
Also used : SecurityUtil(ca.bc.gov.hlth.hnweb.security.SecurityUtil) UserInfo(ca.bc.gov.hlth.hnweb.security.UserInfo) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 3 with SecurityUtil

use of ca.bc.gov.hlth.hnweb.security.SecurityUtil in project moh-hnweb by bcgov.

the class BaseControllerTest method setUp.

@BeforeAll
static void setUp() throws IOException {
    mockBackEnd = new MockWebServer();
    mockBackEnd.start(0);
    mockStatic = Mockito.mockStatic(SecurityUtil.class);
    mockStatic.when(SecurityUtil::loadUserInfo).thenReturn(new UserInfo("unittest", "00000010", "hnweb-user", UUID.randomUUID().toString()));
}
Also used : MockWebServer(okhttp3.mockwebserver.MockWebServer) SecurityUtil(ca.bc.gov.hlth.hnweb.security.SecurityUtil) UserInfo(ca.bc.gov.hlth.hnweb.security.UserInfo) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

SecurityUtil (ca.bc.gov.hlth.hnweb.security.SecurityUtil)3 UserInfo (ca.bc.gov.hlth.hnweb.security.UserInfo)3 BeforeAll (org.junit.jupiter.api.BeforeAll)3 MockWebServer (okhttp3.mockwebserver.MockWebServer)1