Implicit method that returns the FakeApplication
instance for the current test.
Implicit method that returns the FakeApplication
instance for the current test.
Creates new instance of FakeApplication
with parameters set to their defaults.
Creates new instance of FakeApplication
with parameters set to their defaults. Override this method if you
need a FakeApplication
created with non-default parameter values.
The port used by the TestServer
.
The port used by the TestServer
. By default this will be set to the result returned from
Helpers.testServerPort
. You can override this to provide a different port number.
Implicit PortNumber
instance that wraps port
.
Implicit PortNumber
instance that wraps port
. The value returned from portNumber.value
will be same as the value of port
.
the configured port number, wrapped in a PortNumber
Creates new FakeApplication
and running TestServer
instances before executing each test, and
ensures they are cleaned up after the test completes.
Creates new FakeApplication
and running TestServer
instances before executing each test, and
ensures they are cleaned up after the test completes. You can access the FakeApplication
from
your tests as app
and the TestServer
's port number as port
.
the no-arg test function to run with a fixture
the Outcome
of the test execution
Trait that provides a new
FakeApplication
and runningTestServer
instance for each test executed in a ScalaTestSuite
.This
SuiteMixin
trait overrides ScalaTest'swithFixture
method to create a newFakeApplication
andTestServer
before each test, and ensure they are cleaned up after the test has completed. TheFakeApplication
is available (implicitly) from methodapp
. TheTestServer
's port number is available asport
(and implicitly available asportNumber
, wrapped in a PortNumber).By default, this trait creates a new
FakeApplication
for each test using default parameter values, which is returned by thenewAppForTest
method defined in this trait. If your tests need aFakeApplication
with non-default parameters, overridenewAppForTest
to return it.Here's an example that demonstrates some of the services provided by this trait: