aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/scala/com/softwaremill/sttp/testing/streaming/TestStreamingBackend.scala
diff options
context:
space:
mode:
authorSam Guymer <sam@guymer.me>2018-05-17 20:07:04 +1000
committerSam Guymer <sam@guymer.me>2018-05-18 22:28:28 +1000
commit40288a1aaddfc27e141771371d69122ce222a8d0 (patch)
tree14177a51769ce42e88ec3d20435abe505b44aac5 /core/src/test/scala/com/softwaremill/sttp/testing/streaming/TestStreamingBackend.scala
parent96ff655f906f2e3f4e9ba906c42e96506f4668b9 (diff)
downloadsttp-40288a1aaddfc27e141771371d69122ce222a8d0.tar.gz
sttp-40288a1aaddfc27e141771371d69122ce222a8d0.tar.bz2
sttp-40288a1aaddfc27e141771371d69122ce222a8d0.zip
Extract MonadAsyncError implementations
Extract MonadAsyncError implementations into their own projects to allow reuse by multiple backends.
Diffstat (limited to 'core/src/test/scala/com/softwaremill/sttp/testing/streaming/TestStreamingBackend.scala')
-rw-r--r--core/src/test/scala/com/softwaremill/sttp/testing/streaming/TestStreamingBackend.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/src/test/scala/com/softwaremill/sttp/testing/streaming/TestStreamingBackend.scala b/core/src/test/scala/com/softwaremill/sttp/testing/streaming/TestStreamingBackend.scala
new file mode 100644
index 0000000..266c402
--- /dev/null
+++ b/core/src/test/scala/com/softwaremill/sttp/testing/streaming/TestStreamingBackend.scala
@@ -0,0 +1,15 @@
+package com.softwaremill.sttp.testing.streaming
+
+import com.softwaremill.sttp.SttpBackend
+
+import scala.language.higherKinds
+
+trait TestStreamingBackend[R[_], S] {
+ implicit def backend: SttpBackend[R, S]
+
+ implicit def convertToFuture: ConvertToFuture[R]
+
+ def bodyProducer(body: String): S
+
+ def bodyConsumer(stream: S): R[String]
+}