From 56f19912408893552678790552ce440431f17fb4 Mon Sep 17 00:00:00 2001 From: Daniel Meier Date: Thu, 30 May 2019 14:22:18 +0200 Subject: [PATCH] Update AssertJ to version 3.12.2 Update the AssertJ dependency to version 3.12.2. Additionally fix some tests not compiling due to API changes of AssertJ. Fixes gh-6786 --- gradle/dependency-management.gradle | 2 +- ...emoryClientRegistrationRepositoryTests.java | 4 ++-- ...ctiveClientRegistrationRepositoryTests.java | 18 ++++++++---------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/gradle/dependency-management.gradle b/gradle/dependency-management.gradle index 390a0c69b8..652a786803 100644 --- a/gradle/dependency-management.gradle +++ b/gradle/dependency-management.gradle @@ -143,7 +143,7 @@ dependencyManagement { dependency 'org.aspectj:aspectjrt:1.9.3' dependency 'org.aspectj:aspectjtools:1.9.3' dependency 'org.aspectj:aspectjweaver:1.9.3' - dependency 'org.assertj:assertj-core:3.11.1' + dependency 'org.assertj:assertj-core:3.12.2' dependency 'org.attoparser:attoparser:2.0.4.RELEASE' dependency 'org.bouncycastle:bcpkix-jdk15on:1.61' dependency 'org.bouncycastle:bcprov-jdk15on:1.61' diff --git a/oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/registration/InMemoryClientRegistrationRepositoryTests.java b/oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/registration/InMemoryClientRegistrationRepositoryTests.java index 6f30541739..f1042aac04 100644 --- a/oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/registration/InMemoryClientRegistrationRepositoryTests.java +++ b/oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/registration/InMemoryClientRegistrationRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -91,6 +91,6 @@ public class InMemoryClientRegistrationRepositoryTests { @Test public void iteratorWhenGetThenContainsAll() { - assertThat(this.clients.iterator()).containsOnly(this.registration); + assertThat(this.clients).containsOnly(this.registration); } } diff --git a/oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/registration/InMemoryReactiveClientRegistrationRepositoryTests.java b/oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/registration/InMemoryReactiveClientRegistrationRepositoryTests.java index 4287a0e55c..208a84eb76 100644 --- a/oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/registration/InMemoryReactiveClientRegistrationRepositoryTests.java +++ b/oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/registration/InMemoryReactiveClientRegistrationRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,18 +16,17 @@ package org.springframework.security.oauth2.client.registration; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; +import org.junit.Before; +import org.junit.Test; +import reactor.test.StepVerifier; -import java.util.HashMap; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.Before; -import org.junit.Test; - -import reactor.test.StepVerifier; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; /** * @author Rob Winch @@ -107,7 +106,6 @@ public class InMemoryReactiveClientRegistrationRepositoryTests { @Test public void iteratorWhenContainsGithubThenContains() { - assertThat(this.repository.iterator()) - .containsOnly(this.registration); + assertThat(this.repository).containsOnly(this.registration); } }