!htp #16190 refactor and improve marshalling infrastructure, get rid of Marshallers abstraction altogether

Also improve Unmarshalling infrastructure once more.
This commit is contained in:
Mathias 2014-11-12 14:27:30 +01:00
parent 5b126b6d8b
commit d65fe4e04e
17 changed files with 250 additions and 198 deletions

View file

@ -16,7 +16,7 @@ import akka.stream.FlowMaterializer
import scala.util.Try
trait MarshallingTestUtils {
def marshal[T: ToEntityMarshallers](value: T)(implicit ec: ExecutionContext, mat: FlowMaterializer): HttpEntity.Strict =
def marshal[T: ToEntityMarshaller](value: T)(implicit ec: ExecutionContext, mat: FlowMaterializer): HttpEntity.Strict =
Await.result(Marshal(value).to[HttpEntity].flatMap(_.toStrict(1.second)), 1.second)
def unmarshalValue[T: FromEntityUnmarshaller](entity: HttpEntity)(implicit ec: ExecutionContext, mat: FlowMaterializer): T =