=doc, htp minor fixes in docs and tests

This commit is contained in:
2beaucoup 2015-07-17 16:22:12 +02:00
parent 3e3454e617
commit 2012726f1b
5 changed files with 8 additions and 10 deletions

View file

@ -136,9 +136,9 @@ The class ``HttpEntities`` contains static methods to create entities from commo
You can use the ``isX` methods of ``HttpEntity`` to find out of which subclass an entity is if you want to provide
special handling for each of the subtypes. However, in many cases a recipient of an ``HttpEntity`` doesn't care about
of which subtype an entity is (and how data is transported exactly on the HTTP layer). Therefore, a general
``HttpEntity::getDataBytes: Source<ByteString, ?>`` is provided which allows access to the data of an entity regardless
of its concrete subtype.
of which subtype an entity is (and how data is transported exactly on the HTTP layer). Therefore, the general method
``HttpEntity.getDataBytes()`` is provided which returns a ``Source<ByteString, ?>`` that allows access to the data of an
entity regardless of its concrete subtype.
.. note::

View file

@ -133,9 +133,9 @@ The ``HttpEntity`` companion object contains several helper constructors to crea
You can pattern match over the subtypes of ``HttpEntity`` if you want to provide special handling for each of the
subtypes. However, in many cases a recipient of an ``HttpEntity`` doesn't care about of which subtype an entity is
(and how data is transported exactly on the HTTP layer). Therefore, a general
``HttpEntity::dataBytes: Source[ByteString, Any]`` is provided which allows access to the data of an entity regardless
of its concrete subtype.
(and how data is transported exactly on the HTTP layer). Therefore, the general method ``HttpEntity.dataBytes`` is
provided which returns a ``Source[ByteString, Any]`` that allows access to the data of an entity regardless of its
concrete subtype.
.. note::

View file

@ -302,7 +302,7 @@ class MessageSpec extends FreeSpec with Matchers with WithMaterializerSpec {
}
"for a streamed message don't convert half surrogate pairs naively" in new ServerTestSetup {
val gclef = "𝄞"
gclef.size shouldEqual 2
gclef.length shouldEqual 2
// split up the code point
val half1 = gclef.take(1)

View file

@ -37,8 +37,7 @@ class WebsocketServerSpec extends FreeSpec with Matchers with WithMaterializerSp
val request = expectRequest
val upgrade = request.header[UpgradeToWebsocket]
upgrade.isDefined shouldBe
true
upgrade.isDefined shouldBe true
val source =
Source(List(1, 2, 3, 4, 5)).map(num TextMessage.Strict(s"Message $num"))

View file

@ -10,7 +10,6 @@ import akka.http.scaladsl.model.headers.{ UpgradeProtocol, Upgrade }
import akka.http.scaladsl.model.{ HttpRequest, StatusCodes, HttpResponse }
import akka.http.scaladsl.model.ws.{ Message, UpgradeToWebsocket }
import akka.http.scaladsl.server.{ Route, RoutingSpec }
import akka.stream.Materializer
import akka.stream.scaladsl.Flow
class WebsocketDirectivesSpec extends RoutingSpec {