Skip to content

Commit

Permalink
Removed mocked beans no longer needed because of autoconfiguration.
Browse files Browse the repository at this point in the history
  • Loading branch information
rfc3092 committed Jan 14, 2025
1 parent a7bbbba commit f24ad20
Show file tree
Hide file tree
Showing 28 changed files with 17 additions and 180 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package no.nav.testnav.altinn3tilgangservice;

import com.google.cloud.secretmanager.v1.SecretManagerServiceClient;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand All @@ -13,14 +10,6 @@
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
@SuppressWarnings("unused")
public ReactiveJwtDecoder jwtDecoder;

@MockitoBean
@SuppressWarnings("unused")
public SecretManagerServiceClient secretManagerClient;

@Test
void load_app_context() {
assertThat(true).isTrue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;

@SpringBootTest
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
public ReactiveJwtDecoder reactiveJwtDecoder;

@Test
@SuppressWarnings("java:S2699")
void load_app_context() {
assertThat(true).isTrue();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;

@SpringBootTest
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
public ReactiveJwtDecoder jwtDecoder;

@Test
@SuppressWarnings("java:S2699")
void load_app_context() {
assertThat(true).isTrue();
}

}
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package no.nav.testnav.levendearbeidsforholdansettelse;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.data.r2dbc.core.R2dbcEntityTemplate;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand All @@ -14,17 +10,9 @@
@ActiveProfiles("test")
class LevendeArbeidsforholdAnsettelseApplicationTests {

@MockitoBean
@SuppressWarnings("unused")
public ReactiveJwtDecoder jwtDecoder;

@Autowired
private R2dbcEntityTemplate template;

@Test
void load_app_context() {
assertThat(template)
.isNotNull();
assertThat(true).isTrue();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;

@SpringBootTest
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
public ReactiveJwtDecoder jwtDecoder;

@Test
@SuppressWarnings("java:S2699")
void load_app_context() {
assertThat(true).isTrue();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;

@SpringBootTest
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
public ReactiveJwtDecoder jwtDecoder;

@Test
@SuppressWarnings("java:S2699")
void load_app_context() {
assertThat(true).isTrue();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand All @@ -12,10 +10,6 @@
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
@SuppressWarnings("unused")
private ReactiveJwtDecoder jwtDecoder;

@Test
void contextLoads() {
assertThat(true).isTrue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand All @@ -12,10 +10,6 @@
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
@SuppressWarnings("unused")
private ReactiveJwtDecoder reactiveJwtDecoder;

@Test
void load_app_context() {
assertThat(true).isTrue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand All @@ -12,10 +10,6 @@
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
@SuppressWarnings("unused")
private ReactiveJwtDecoder reactiveJwtDecoder;

@Test
void load_app_context() {
assertThat(true).isTrue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand All @@ -12,10 +10,6 @@
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
@SuppressWarnings("unused")
private ReactiveJwtDecoder reactiveJwtDecoder;

@Test
void load_app_context() {
assertThat(true).isTrue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand All @@ -12,10 +10,6 @@
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
@SuppressWarnings("unused")
private ReactiveJwtDecoder reactiveJwtDecoder;

@Test
void load_app_context() {
assertThat(true).isTrue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand All @@ -12,10 +10,6 @@
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
@SuppressWarnings("unused")
private ReactiveJwtDecoder reactiveJwtDecoder;

@Test
void load_app_context() {
assertThat(true).isTrue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand All @@ -12,10 +10,6 @@
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
@SuppressWarnings("unused")
public ReactiveJwtDecoder reactiveJwtDecoder;

@Test
void load_app_context() {
assertThat(true).isTrue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand All @@ -12,10 +10,6 @@
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
@SuppressWarnings("unused")
private ReactiveJwtDecoder reactiveJwtDecoder;

@Test
void load_app_context() {
assertThat(true).isTrue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand All @@ -12,10 +10,6 @@
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
@SuppressWarnings("unused")
private ReactiveJwtDecoder reactiveJwtDecoder;

@Test
void load_app_context() {
assertThat(true).isTrue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand All @@ -12,10 +10,6 @@
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
@SuppressWarnings("unused")
private ReactiveJwtDecoder reactiveJwtDecoder;

@Test
void load_app_context() {
assertThat(true).isTrue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand All @@ -12,10 +10,6 @@
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
@SuppressWarnings("unused")
private ReactiveJwtDecoder reactiveJwtDecoder;

@Test
void load_app_context() {
assertThat(true).isTrue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import org.springframework.test.context.ActiveProfiles;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand All @@ -12,10 +10,6 @@
@ActiveProfiles("test")
class ApplicationContextTest {

@MockitoBean
@SuppressWarnings("unused")
private ReactiveJwtDecoder reactiveJwtDecoder;

@Test
void load_app_context() {
assertThat(true).isTrue();
Expand Down
Loading

0 comments on commit f24ad20

Please sign in to comment.