How do I supply an implicit value for an akka.stream.Materializer when sending a FakeRequest?

前端 未结 2 1666
借酒劲吻你
借酒劲吻你 2021-02-19 23:43

I\'m trying to make sense of the error(s) I\'m seeing below, and to learn how to fix it.

could not find implicit value for parameter materializer: akka.Stream.M         


        
2条回答
  •  滥情空心
    2021-02-20 00:37

    You can create an implicit ActorMaterializer within your test class which will use testkit's ActorSystem:

    import akka.testkit.TestKit
    import akka.actor.ActorSystem
    
    class TestJmlPlay(_system : ActorSystem) extends TestKit(_system) ... {
    
      implicit val materializer: ActorMaterializer = ActorMaterializer()
    
      val bbox = ...
    

提交回复
热议问题