diff options
author | adamw <adam@warski.org> | 2017-07-06 15:59:40 +0200 |
---|---|---|
committer | adamw <adam@warski.org> | 2017-07-06 15:59:40 +0200 |
commit | a2f3939a89c8b291c4697e822bb931703b3bd3ba (patch) | |
tree | 572f9dd936dab9da0759b49e94a1dec9d7e7eab9 /tests | |
parent | d1c5efa7a05875ef6a24946bc86e395cbc6cac30 (diff) | |
download | sttp-a2f3939a89c8b291c4697e822bb931703b3bd3ba.tar.gz sttp-a2f3939a89c8b291c4697e822bb931703b3bd3ba.tar.bz2 sttp-a2f3939a89c8b291c4697e822bb931703b3bd3ba.zip |
Non-compilation tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala b/tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala new file mode 100644 index 0000000..caf6632 --- /dev/null +++ b/tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala @@ -0,0 +1,23 @@ +package com.softwaremill.sttp + +import org.scalatest.{FlatSpec, Matchers} + +class IllTypedTests extends FlatSpec with Matchers { + "compilation" should "fail when trying to stream using the default handler" in { + """ + import akka.stream.scaladsl.Source + import akka.util.ByteString + import java.net.URI + implicit val sttpHandler = HttpConnectionSttpHandler + sttp.get(new URI("http://example.com")).send(responseAsStream[Source[ByteString, Any]]) + """ shouldNot typeCheck + } + + "compilation" should "fail when trying to send a request without giving an URL" in { + """ + import java.net.URI + implicit val sttpHandler = HttpConnectionSttpHandler + sttp.send(responseAsString) + """ shouldNot typeCheck + } +} |