Search in sources :

Example 1 with SystemUserTokenProvider

use of no.nav.common.sts.SystemUserTokenProvider in project veilarbportefolje by navikt.

the class OppfolgingServiceTest method setup.

@Before
public void setup() {
    systemUserTokenProvider = mock(SystemUserTokenProvider.class);
    DataSource ds = setupInMemoryDatabase();
    JdbcTemplate db = new JdbcTemplate(ds);
    oppfolgingRepositoryV2 = new OppfolgingRepositoryV2(SingletonPostgresContainer.init().createJdbcTemplate());
    oppfolgingRepository = new OppfolgingRepository(db);
    String apiUrl = "http://localhost:" + wireMockRule.port();
    oppfolgingService = new OppfolgingService(oppfolgingRepository, mock(OppfolgingAvsluttetService.class), systemUserTokenProvider, apiUrl, oppfolgingRepositoryV2, mock(AktorClient.class));
}
Also used : SystemUserTokenProvider(no.nav.common.sts.SystemUserTokenProvider) TestUtil.readFileAsJsonString(no.nav.pto.veilarbportefolje.util.TestUtil.readFileAsJsonString) JdbcTemplate(org.springframework.jdbc.core.JdbcTemplate) DataSource(javax.sql.DataSource) Before(org.junit.Before)

Aggregations

DataSource (javax.sql.DataSource)1 SystemUserTokenProvider (no.nav.common.sts.SystemUserTokenProvider)1 TestUtil.readFileAsJsonString (no.nav.pto.veilarbportefolje.util.TestUtil.readFileAsJsonString)1 Before (org.junit.Before)1 JdbcTemplate (org.springframework.jdbc.core.JdbcTemplate)1