diff options
author | Sam Guymer <sam@guymer.me> | 2018-05-17 20:07:04 +1000 |
---|---|---|
committer | Sam Guymer <sam@guymer.me> | 2018-05-18 22:33:21 +1000 |
commit | 5980017ece9be1ebf30775e5babf81e0e2f1fcd9 (patch) | |
tree | 2c4ee642d8efb9e6785da3fe8a7decba507329ab /tests | |
parent | 40288a1aaddfc27e141771371d69122ce222a8d0 (diff) | |
download | sttp-5980017ece9be1ebf30775e5babf81e0e2f1fcd9.tar.gz sttp-5980017ece9be1ebf30775e5babf81e0e2f1fcd9.tar.bz2 sttp-5980017ece9be1ebf30775e5babf81e0e2f1fcd9.zip |
Code review updates
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala | 13 | ||||
-rw-r--r-- | tests/src/test/scala/com/softwaremill/sttp/streaming/AsyncHttpClientFs2StreamingTests.scala | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala b/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala index 821b951..55e21b8 100644 --- a/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala +++ b/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala @@ -19,6 +19,9 @@ import com.softwaremill.sttp.asynchttpclient.cats.AsyncHttpClientCatsBackend import com.softwaremill.sttp.asynchttpclient.future.AsyncHttpClientFutureBackend import com.softwaremill.sttp.asynchttpclient.monix.AsyncHttpClientMonixBackend import com.softwaremill.sttp.asynchttpclient.scalaz.AsyncHttpClientScalazBackend +import com.softwaremill.sttp.impl.cats.convertCatsIOToFuture +import com.softwaremill.sttp.impl.monix.convertMonixTaskToFuture +import com.softwaremill.sttp.impl.scalaz.convertScalazTaskToFuture import com.softwaremill.sttp.okhttp.monix.OkHttpMonixBackend import com.softwaremill.sttp.okhttp.{OkHttpFutureBackend, OkHttpSyncBackend} import com.softwaremill.sttp.testing.streaming.ConvertToFuture @@ -185,14 +188,12 @@ class BasicTests runTests("TryHttpURLConnection")(TryHttpURLConnectionBackend(), ConvertToFuture.scalaTry) runTests("Akka HTTP")(AkkaHttpBackend.usingActorSystem(actorSystem), ConvertToFuture.future) runTests("Async Http Client - Future")(AsyncHttpClientFutureBackend(), ConvertToFuture.future) - runTests("Async Http Client - Scalaz")(AsyncHttpClientScalazBackend(), - com.softwaremill.sttp.impl.scalaz.convertToFuture) - runTests("Async Http Client - Monix")(AsyncHttpClientMonixBackend(), com.softwaremill.sttp.impl.monix.convertToFuture) - runTests("Async Http Client - Cats Effect")(AsyncHttpClientCatsBackend[cats.effect.IO](), - com.softwaremill.sttp.impl.cats.convertToFuture) + runTests("Async Http Client - Scalaz")(AsyncHttpClientScalazBackend(), convertScalazTaskToFuture) + runTests("Async Http Client - Monix")(AsyncHttpClientMonixBackend(), convertMonixTaskToFuture) + runTests("Async Http Client - Cats IO")(AsyncHttpClientCatsBackend[cats.effect.IO](), convertCatsIOToFuture) runTests("OkHttpSyncClientHandler")(OkHttpSyncBackend(), ConvertToFuture.id) runTests("OkHttpAsyncClientHandler - Future")(OkHttpFutureBackend(), ConvertToFuture.future) - runTests("OkHttpAsyncClientHandler - Monix")(OkHttpMonixBackend(), com.softwaremill.sttp.impl.monix.convertToFuture) + runTests("OkHttpAsyncClientHandler - Monix")(OkHttpMonixBackend(), convertMonixTaskToFuture) def runTests[R[_]](name: String)(implicit backend: SttpBackend[R, Nothing], diff --git a/tests/src/test/scala/com/softwaremill/sttp/streaming/AsyncHttpClientFs2StreamingTests.scala b/tests/src/test/scala/com/softwaremill/sttp/streaming/AsyncHttpClientFs2StreamingTests.scala index 680e91a..8959ccc 100644 --- a/tests/src/test/scala/com/softwaremill/sttp/streaming/AsyncHttpClientFs2StreamingTests.scala +++ b/tests/src/test/scala/com/softwaremill/sttp/streaming/AsyncHttpClientFs2StreamingTests.scala @@ -6,6 +6,7 @@ import cats.effect._ import cats.instances.string._ import com.softwaremill.sttp.SttpBackend import com.softwaremill.sttp.asynchttpclient.fs2.AsyncHttpClientFs2Backend +import com.softwaremill.sttp.impl.cats.convertCatsIOToFuture import com.softwaremill.sttp.testing.streaming.{ConvertToFuture, TestStreamingBackend} import fs2.{Chunk, Stream, text} @@ -14,8 +15,7 @@ class AsyncHttpClientFs2StreamingTests extends TestStreamingBackend[IO, Stream[I override implicit val backend: SttpBackend[IO, Stream[IO, ByteBuffer]] = AsyncHttpClientFs2Backend[IO]() - override implicit val convertToFuture: ConvertToFuture[IO] = - com.softwaremill.sttp.impl.cats.convertToFuture + override implicit val convertToFuture: ConvertToFuture[IO] = convertCatsIOToFuture override def bodyProducer(body: String): Stream[IO, ByteBuffer] = Stream.emits(body.getBytes("utf-8").map(b => ByteBuffer.wrap(Array(b)))) |