Remove incorrect AssertJ imports

Fix a few tests that were accidentally importing incorrect AssertJ
classes.

Issue gh-8945
This commit is contained in:
Phillip Webb
2020-08-04 10:49:27 -07:00
committed by Rob Winch
parent a5aa6b3d7f
commit 0a3eeb9c80
3 changed files with 8 additions and 10 deletions

View File

@@ -24,11 +24,12 @@ import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.AssertionsForClassTypes;
import org.junit.Test;
import org.springframework.core.convert.converter.Converter;
import static org.assertj.core.api.Assertions.assertThatCode;
/**
* Tests for {@link RsaKeyConverters}
*/
@@ -98,7 +99,7 @@ public class RsaKeyConvertersTests {
@Test
public void pkcs8WhenConvertingPkcs1PrivateKeyThenIllegalArgumentException() {
AssertionsForClassTypes.assertThatCode(() -> this.pkcs8.convert(toInputStream(PKCS1_PRIVATE_KEY)))
assertThatCode(() -> this.pkcs8.convert(toInputStream(PKCS1_PRIVATE_KEY)))
.isInstanceOf(IllegalArgumentException.class);
}
@@ -110,7 +111,7 @@ public class RsaKeyConvertersTests {
@Test
public void x509WhenConvertingDerEncodedX509PublicKeyThenIllegalArgumentException() {
AssertionsForClassTypes.assertThatCode(() -> this.x509.convert(toInputStream(MALFORMED_X509_KEY)))
assertThatCode(() -> this.x509.convert(toInputStream(MALFORMED_X509_KEY)))
.isInstanceOf(IllegalArgumentException.class);
}