org.scalatest.fixture.FixtureSuite
Trait whose instances encapsulate a test function that takes a fixture and config map.
The FixtureSuite
trait's implementation of runTest
passes instances of this trait
to FixtureSuite
's withFixture
method, such as:
def testSomething(fixture: Fixture) { // ... } def testSomethingElse(fixture: Fixture, info: Informer) { // ... }
For more detail and examples, see the
documentation for trait FixtureSuite
.
Run the test, using the passed FixtureParam
.
Run the test, using the passed FixtureParam
.
Return a Map[String, Any]
containing objects that can be used
to configure the fixture and test.
Return a Map[String, Any]
containing objects that can be used
to configure the fixture and test.
The name of this test.
The name of this test.
Convert this OneArgTest
to a NoArgTest
whose
name
and configMap
methods return the same values
as this OneArgTest
, and whose apply
method invokes
this OneArgTest
's apply method,
passing in the given fixture
.
Convert this OneArgTest
to a NoArgTest
whose
name
and configMap
methods return the same values
as this OneArgTest
, and whose apply
method invokes
this OneArgTest
's apply method,
passing in the given fixture
.
This method makes it easier to invoke the withFixture
method
that takes a NoArgTest
. For example, if a FixtureSuite
mixes in SeveredStackTraces
, it will inherit an implementation
of withFixture(NoArgTest)
provided by
SeveredStackTraces
that implements the stack trace severing
behavior. If the FixtureSuite
does not delegate to that
withFixture(NoArgTest)
method, the stack trace severing behavior
will not happen. Here's how that might look in a FixtureSuite
whose FixtureParam
is StringBuilder
:
def withFixture(test: OneArgTest) { withFixture(test.toNoArgTest(new StringBuilder)) }
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
a string representation of the object.
Trait whose instances encapsulate a test function that takes a fixture and config map.
The
FixtureSuite
trait's implementation ofrunTest
passes instances of this trait toFixtureSuite
'swithFixture
method, such as:For more detail and examples, see the documentation for trait
FixtureSuite
.