trait ConfiguredApp extends TestSuiteMixin
- Alphabetic
- By Inheritance
- ConfiguredApp
- TestSuiteMixin
- SuiteMixin
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def expectedTestCount(filter: Filter): Int
- Definition Classes
- SuiteMixin
- abstract def nestedSuites: IndexedSeq[Suite]
- Definition Classes
- SuiteMixin
- abstract def rerunner: Option[String]
- Definition Classes
- SuiteMixin
- abstract def suiteId: String
- Definition Classes
- SuiteMixin
- abstract def suiteName: String
- Definition Classes
- SuiteMixin
- abstract def tags: Map[String, Set[String]]
- Definition Classes
- SuiteMixin
- abstract def testDataFor(testName: String, theConfigMap: ConfigMap): TestData
- Definition Classes
- SuiteMixin
- abstract def testNames: Set[String]
- Definition Classes
- SuiteMixin
- abstract val styleName: String
- Definition Classes
- SuiteMixin
- Annotations
- @deprecated
- Deprecated
(Since version 3.1.0) The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement.
Concrete Value Members
- implicit final def app: Application
The "configured"
Application
instance that was passed intorun
via theConfigMap
.The "configured"
Application
instance that was passed intorun
via theConfigMap
.- returns
the configured
Application
- def run(testName: Option[String], args: Args): Status
Looks in
args.configMap
for a key named "org.scalatestplus.play.app" whose value is aApplication
, and if it exists, sets it as theApplication
that will be returned from theapp
method, then callssuper.run
.Looks in
args.configMap
for a key named "org.scalatestplus.play.app" whose value is aApplication
, and if it exists, sets it as theApplication
that will be returned from theapp
method, then callssuper.run
.If no key matches "org.scalatestplus.play.app" in
args.configMap
, or the associated value is not aApplication
, throwsIllegalArgumentException
.To prevent discovery of nested suites you can annotate them with
@DoNotDiscover
.- testName
an optional name of one test to run. If
None
, all relevant tests should be run. I.e.,None
acts like a wildcard that means run all relevant tests in thisSuite
.- args
the
Args
for this run- returns
a
Status
object that indicates when all tests and nested suites started by this method have completed, and whether or not a failure occurred.
- Definition Classes
- ConfiguredApp → SuiteMixin
- Exceptions thrown
java.lang.IllegalArgumentException
if theApplication
does not appear inargs.configMap
under the expected key
Trait that provides a configured
Application
to the suite into which it is mixed.The purpose of this trait is to allow nested suites of an enclosing suite that extends GuiceOneAppPerSuite to make use of the
Application
provided byGuiceOneAppPerSuite
. TraitGuiceOneAppPerSuite
will ensure theApplication
is placed in theConfigMap
under the keyorg.scalatestplus.play.app
before nested suites are invoked. This represents the "configured application" that is passed from the enclosing suite to the nested suites. TraitConfiguredApp
extracts theApplication
from theConfigMap
and makes it available via theapp
method it provides.To prevent discovery of nested suites you can annotate them with
@DoNotDiscover
. Here's an example, taken fromGuiceOneAppPerSuite
's documentation: