WithApplicationComponents

org.scalatestplus.play.components.WithApplicationComponents

A trait that provides a components in scope and returns them when newApplication is called.

Mixin one of the public traits in this package to provide the desired functionality.

This class has several methods that can be used to customize the behavior in specific ways.

This is targeted at functional tests requiring a running application that is bootstrapped using Macwire/Compile time DI. This is provided as an alternative to the GuiceApplicationBuilder which requires guice bootstrapping.

Attributes

See also
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def components: BuiltInComponents

Override this function to instantiate the components - a factory of sorts.

Override this function to instantiate the components - a factory of sorts.

Attributes

Returns

the components to be used by the application

Concrete methods

def context: Context

Attributes

Returns

a context to use to create the application.

final def newApplication: Application

Attributes

Returns

new application instance and set the components. This must be called for components to be properly set up.