SuiteMixin
org.scalatest.SuiteMixin
trait SuiteMixin
Trait defining abstract "lifecycle" methods that are implemented in Suite
and can be overridden in stackable modification traits.
The main purpose of SuiteMixin
is to differentiate core Suite
style traits, such as Spec
, FunSuite
, and FunSpec
from stackable modification traits for Suite
s such as BeforeAndAfterEach
, OneInstancePerTest
, and SequentialNestedSuiteExecution
. Because these stackable traits extend SuiteMixin
instead of Suite
, you can't define a suite by simply extending one of the stackable traits:
class MySuite extends BeforeAndAfterEach // Won't compile
Instead, you need to extend a core Suite
trait and mix the stackable BeforeAndAfterEach
trait into that, like this:
class MySuite extends FunSuite with BeforeAndAfterEach // Compiles fine
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait AsyncTestSuiteMixintrait AsyncCancelAfterFailuretrait AsyncTimeLimitedTeststrait BeforeAndAftertrait BeforeAndAfterAlltrait BeforeAndAfterEachtrait OneInstancePerTesttrait ParallelTestExecutiontrait RandomTestOrderclass Sequentialclass Stepwisetrait TestSuiteMixintrait ConductorMethodstrait TimeLimitedTeststrait CancelAfterFailuretrait SeveredStackTracestrait TestsBeforeNestedSuites
- Self type
Members list
In this article