MockWSHelpers

mockws.MockWSHelpers
See theMockWSHelpers companion object

The trait provides a materializer you need in order to use MockWS and its Action { ... } definitions inside your testclasses.

Mix this trait into the tests where you use MockWS. WARNING: you have to call shutdownHelpers() after usage to avoid memory leaks.

You can also use the object if you dislike traits and like to instead import the functionality.

Example:

class MySpec extends FreeSpec with Matchers with MockWSHelpers with BeforeAndAfterAll {
  ...

 override def afterAll(): Unit = {
   shutdownHelpers()
 }
}

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object MockWSHelpers

Members list

Value members

Concrete methods

def shutdownHelpers(): Unit

Concrete fields

val Action: DefaultActionBuilder
val BodyParser: PlayBodyParsers

Implicits

Implicits

implicit val materializer: Materializer