Skip to content

Commit

Permalink
Refactor test to junit 5
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcwarren committed Dec 2, 2021
1 parent 98f370e commit 6329ca1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
10 changes: 5 additions & 5 deletions thunx-autoconfigure/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ plugins {

apply from: "${rootDir}/gradle/publish.gradle"

repositories {
mavenCentral()
}

dependencies {

compileOnly platform("org.springframework.boot:spring-boot-dependencies:${springBootBomVersion}")
Expand All @@ -32,7 +28,7 @@ dependencies {
testImplementation platform("org.springframework.boot:spring-boot-dependencies:${springBootBomVersion}")
testImplementation platform("org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}")

testCompile group: 'junit', name: 'junit', version: '4.12'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.assertj:assertj-core:3.21.0'
testImplementation 'org.mockito:mockito-core:2.1.0'
testImplementation "org.springframework.boot:spring-boot-test:${springBootBomVersion}"
Expand All @@ -45,3 +41,7 @@ dependencies {
testImplementation project(':thunx-pdp-opa')
testImplementation "eu.xenit.contentcloud:opa-async-java-client:0.2.0"
}

test {
useJUnitPlatform()
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@
import eu.xenit.contentcloud.thunx.encoding.ThunkExpressionDecoder;
import eu.xenit.contentcloud.thunx.spring.data.rest.AbacExceptionHandler;
import eu.xenit.contentcloud.thunx.spring.data.rest.AbacRequestFilter;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.repository.support.Repositories;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
import eu.xenit.contentcloud.opa.client.OpaClient;
import eu.xenit.contentcloud.thunx.pdp.PolicyDecisionPointClient;
import eu.xenit.contentcloud.thunx.spring.gateway.filter.AbacGatewayFilterFactory;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.security.authorization.ReactiveAuthorizationManager;
import org.springframework.security.web.server.authorization.AuthorizationContext;

Expand Down

0 comments on commit 6329ca1

Please sign in to comment.