diff options
Diffstat (limited to 'tests/src/test/scala/com')
-rw-r--r-- | tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala | 4 | ||||
-rw-r--r-- | tests/src/test/scala/com/softwaremill/sttp/testHelpers.scala | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala b/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala index 5f17a7a..36c82ef 100644 --- a/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala +++ b/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala @@ -16,6 +16,7 @@ import com.typesafe.scalalogging.StrictLogging import org.scalatest.concurrent.{IntegrationPatience, ScalaFutures} import org.scalatest.{BeforeAndAfterAll, FlatSpec, Matchers} import better.files._ +import com.softwaremill.sttp.asynchttpclient.cats.CatsAsyncHttpClientHandler import com.softwaremill.sttp.asynchttpclient.future.FutureAsyncHttpClientHandler import com.softwaremill.sttp.asynchttpclient.monix.MonixAsyncHttpClientHandler import com.softwaremill.sttp.asynchttpclient.scalaz.ScalazAsyncHttpClientHandler @@ -130,6 +131,9 @@ class BasicTests ForceWrappedValue.scalazTask) runTests("Async Http Client - Monix")(MonixAsyncHttpClientHandler(), ForceWrappedValue.monixTask) + runTests("Async Http Client - Cats Effect")( + CatsAsyncHttpClientHandler[cats.effect.IO](), + ForceWrappedValue.catsIo) runTests("OkHttpSyncClientHandler")(OkHttpSyncClientHandler(), ForceWrappedValue.id) runTests("OkHttpSyncClientHandler - Future")(OkHttpFutureClientHandler(), diff --git a/tests/src/test/scala/com/softwaremill/sttp/testHelpers.scala b/tests/src/test/scala/com/softwaremill/sttp/testHelpers.scala index 9bf68bb..558e9dd 100644 --- a/tests/src/test/scala/com/softwaremill/sttp/testHelpers.scala +++ b/tests/src/test/scala/com/softwaremill/sttp/testHelpers.scala @@ -53,6 +53,10 @@ trait ForceWrapped extends ScalaFutures { this: Suite => override def force[T](wrapped: monix.eval.Task[T]): T = wrapped.runAsync.futureValue } + val catsIo = new ForceWrappedValue[cats.effect.IO] { + override def force[T](wrapped: cats.effect.IO[T]): T = + wrapped.unsafeRunSync + } } implicit class ForceDecorator[R[_], T](wrapped: R[T]) { def force()(implicit fwv: ForceWrappedValue[R]): T = fwv.force(wrapped) |