From c251d0b798f5194765c267d38ea56283eaf07d9b Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 22 Aug 2020 06:58:22 +0200 Subject: [PATCH] Update scalatest to 3.2.2 --- build.sbt | 2 +- .../scala/com/twitter/finagle/oauth2/AuthHeaderSpec.scala | 6 ++++-- .../com/twitter/finagle/oauth2/AuthorizationCodeSpec.scala | 6 ++++-- .../finagle/oauth2/ClientCredentialFetcherSpec.scala | 7 ++++--- .../com/twitter/finagle/oauth2/ClientCredentialsSpec.scala | 6 ++++-- .../scala/com/twitter/finagle/oauth2/EndToEndSpec.scala | 7 ++++--- .../scala/com/twitter/finagle/oauth2/PasswordSpec.scala | 6 ++++-- .../com/twitter/finagle/oauth2/RefreshTokenSpec.scala | 7 ++++--- .../com/twitter/finagle/oauth2/RequestParameterSpec.scala | 7 ++++--- 9 files changed, 33 insertions(+), 21 deletions(-) diff --git a/build.sbt b/build.sbt index 3028891..a14d4b6 100644 --- a/build.sbt +++ b/build.sbt @@ -12,7 +12,7 @@ val baseSettings = Seq( libraryDependencies ++= Seq( "com.twitter" %% "finagle-http" % finagleVersion, "org.scalacheck" %% "scalacheck" % "1.14.0" % Test, - "org.scalatest" %% "scalatest" % "3.0.8" % Test + "org.scalatest" %% "scalatest" % "3.2.2" % Test ) ) diff --git a/src/test/scala/com/twitter/finagle/oauth2/AuthHeaderSpec.scala b/src/test/scala/com/twitter/finagle/oauth2/AuthHeaderSpec.scala index 3561842..bec7136 100644 --- a/src/test/scala/com/twitter/finagle/oauth2/AuthHeaderSpec.scala +++ b/src/test/scala/com/twitter/finagle/oauth2/AuthHeaderSpec.scala @@ -2,9 +2,11 @@ package com.twitter.finagle.oauth2 import com.twitter.finagle.http.{HeaderMap, ParamMap} import org.scalatest._ -import org.scalatest.Matchers._ +import matchers.should.Matchers._ +import org.scalatest.matchers +import org.scalatest.flatspec.AnyFlatSpec -class AuthHeaderSpec extends FlatSpec { +class AuthHeaderSpec extends AnyFlatSpec { def createRequest(authorization: Option[String]): Request.ProtectedResource = authorization match { case Some(s) => diff --git a/src/test/scala/com/twitter/finagle/oauth2/AuthorizationCodeSpec.scala b/src/test/scala/com/twitter/finagle/oauth2/AuthorizationCodeSpec.scala index 423d510..cf2ee27 100644 --- a/src/test/scala/com/twitter/finagle/oauth2/AuthorizationCodeSpec.scala +++ b/src/test/scala/com/twitter/finagle/oauth2/AuthorizationCodeSpec.scala @@ -2,10 +2,12 @@ package com.twitter.finagle.oauth2 import com.twitter.finagle.http.{HeaderMap, ParamMap} import org.scalatest._ -import org.scalatest.Matchers._ +import matchers.should.Matchers._ import com.twitter.util.{Await, Future} +import org.scalatest.matchers +import org.scalatest.flatspec.AnyFlatSpec -class AuthorizationCodeSpec extends FlatSpec { +class AuthorizationCodeSpec extends AnyFlatSpec { it should "handle request" in { val authorizationCode = GrantHandler.AuthorizationCode diff --git a/src/test/scala/com/twitter/finagle/oauth2/ClientCredentialFetcherSpec.scala b/src/test/scala/com/twitter/finagle/oauth2/ClientCredentialFetcherSpec.scala index b97aca3..649ee7e 100644 --- a/src/test/scala/com/twitter/finagle/oauth2/ClientCredentialFetcherSpec.scala +++ b/src/test/scala/com/twitter/finagle/oauth2/ClientCredentialFetcherSpec.scala @@ -1,10 +1,11 @@ package com.twitter.finagle.oauth2 import com.twitter.finagle.http.{HeaderMap, ParamMap} -import org.scalatest.FlatSpec -import org.scalatest.Matchers._ +import matchers.should.Matchers._ +import org.scalatest.matchers +import org.scalatest.flatspec.AnyFlatSpec -class ClientCredentialFetcherSpec extends FlatSpec { +class ClientCredentialFetcherSpec extends AnyFlatSpec { it should "fetch Basic64" in { val request = new Request.Authorization( diff --git a/src/test/scala/com/twitter/finagle/oauth2/ClientCredentialsSpec.scala b/src/test/scala/com/twitter/finagle/oauth2/ClientCredentialsSpec.scala index 246412b..5c10146 100644 --- a/src/test/scala/com/twitter/finagle/oauth2/ClientCredentialsSpec.scala +++ b/src/test/scala/com/twitter/finagle/oauth2/ClientCredentialsSpec.scala @@ -2,10 +2,12 @@ package com.twitter.finagle.oauth2 import com.twitter.finagle.http.{HeaderMap, ParamMap} import org.scalatest._ -import org.scalatest.Matchers._ +import matchers.should.Matchers._ import com.twitter.util.{Await, Future} +import org.scalatest.matchers +import org.scalatest.flatspec.AnyFlatSpec -class ClientCredentialsSpec extends FlatSpec { +class ClientCredentialsSpec extends AnyFlatSpec { it should "handle request" in { val clientCredentials = GrantHandler.ClientCredentials diff --git a/src/test/scala/com/twitter/finagle/oauth2/EndToEndSpec.scala b/src/test/scala/com/twitter/finagle/oauth2/EndToEndSpec.scala index e0b5fbf..b115567 100644 --- a/src/test/scala/com/twitter/finagle/oauth2/EndToEndSpec.scala +++ b/src/test/scala/com/twitter/finagle/oauth2/EndToEndSpec.scala @@ -4,10 +4,11 @@ import com.twitter.finagle.OAuth2 import com.twitter.finagle.http.{HeaderMap, ParamMap} import com.twitter.util.{Await, Future} import java.util.Date -import org.scalatest.FlatSpec -import org.scalatest.Matchers._ +import matchers.should.Matchers._ +import org.scalatest.matchers +import org.scalatest.flatspec.AnyFlatSpec -class EndToEndSpec extends FlatSpec { +class EndToEndSpec extends AnyFlatSpec { def successfulAccessTokenHandler(): MockDataHandler = new MockDataHandler() { override def validateClient(clientId: String, clientSecret: String, grantType: String): Future[Boolean] = diff --git a/src/test/scala/com/twitter/finagle/oauth2/PasswordSpec.scala b/src/test/scala/com/twitter/finagle/oauth2/PasswordSpec.scala index c97f579..0d169d5 100644 --- a/src/test/scala/com/twitter/finagle/oauth2/PasswordSpec.scala +++ b/src/test/scala/com/twitter/finagle/oauth2/PasswordSpec.scala @@ -2,10 +2,12 @@ package com.twitter.finagle.oauth2 import com.twitter.finagle.http.{HeaderMap, ParamMap} import org.scalatest._ -import org.scalatest.Matchers._ +import matchers.should.Matchers._ import com.twitter.util.{Await, Future} +import org.scalatest.matchers +import org.scalatest.flatspec.AnyFlatSpec -class PasswordSpec extends FlatSpec { +class PasswordSpec extends AnyFlatSpec { it should "handle request" in { val password = GrantHandler.Password diff --git a/src/test/scala/com/twitter/finagle/oauth2/RefreshTokenSpec.scala b/src/test/scala/com/twitter/finagle/oauth2/RefreshTokenSpec.scala index a3f334f..d8f041a 100644 --- a/src/test/scala/com/twitter/finagle/oauth2/RefreshTokenSpec.scala +++ b/src/test/scala/com/twitter/finagle/oauth2/RefreshTokenSpec.scala @@ -1,11 +1,12 @@ package com.twitter.finagle.oauth2 import com.twitter.finagle.http.{HeaderMap, ParamMap} -import org.scalatest.FlatSpec -import org.scalatest.Matchers._ +import matchers.should.Matchers._ import com.twitter.util.{Await, Future} +import org.scalatest.matchers +import org.scalatest.flatspec.AnyFlatSpec -class RefreshTokenSpec extends FlatSpec { +class RefreshTokenSpec extends AnyFlatSpec { it should "handle request" in { val refreshToken = GrantHandler.RefreshToken diff --git a/src/test/scala/com/twitter/finagle/oauth2/RequestParameterSpec.scala b/src/test/scala/com/twitter/finagle/oauth2/RequestParameterSpec.scala index 252ef7c..743b3a0 100644 --- a/src/test/scala/com/twitter/finagle/oauth2/RequestParameterSpec.scala +++ b/src/test/scala/com/twitter/finagle/oauth2/RequestParameterSpec.scala @@ -1,10 +1,11 @@ package com.twitter.finagle.oauth2 import com.twitter.finagle.http.{HeaderMap, ParamMap} -import org.scalatest.Matchers._ -import org.scalatest.FlatSpec +import matchers.should.Matchers._ +import org.scalatest.matchers +import org.scalatest.flatspec.AnyFlatSpec -class RequestParameterSpec extends FlatSpec { +class RequestParameterSpec extends AnyFlatSpec { def createRequest( oauthToken: Option[String],