trait OneArgTest extends (FixtureParam) => Outcome with TestData
A test function taking a fixture parameter and returning an Outcome
.
For more detail and examples, see the
documentation for trait fixture.FlatSpec
.
- Attributes
- protected
- Self Type
- OneArgTest
- Source
- FixtureTestSuite.scala
- Alphabetic
- By Inheritance
- OneArgTest
- TestData
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def apply(fixture: FixtureTestSuite.FixtureParam): Outcome
Runs the test, using the passed
FixtureParam
.Runs the test, using the passed
FixtureParam
.- fixture
the
FixtureParam
- returns
an instance of
Outcome
- Definition Classes
- OneArgTest → Function1
- abstract val configMap: ConfigMap
A
ConfigMap
containing objects that can be used to configure the fixture and test.A
ConfigMap
containing objects that can be used to configure the fixture and test.- Definition Classes
- TestData
- abstract val name: String
The name of this test.
The name of this test.
See the main documentation for this trait for an explanation of the difference between
name
,text
, andscopes
.- Definition Classes
- TestData
- abstract val pos: Option[Position]
- Definition Classes
- TestData
- abstract val scopes: IndexedSeq[String]
An immutable
IndexedSeq
containing the text for any "scopes" enclosing this test, in order from outermost to innermost scope.An immutable
IndexedSeq
containing the text for any "scopes" enclosing this test, in order from outermost to innermost scope.See the main documentation for this trait for an explanation of the difference between
name
,text
, andscopes
. If a test has no surrounding scopes, this field will contain an emptyIndexedSeq
.- Definition Classes
- TestData
- abstract val tags: Set[String]
Tag names for this test.
Tag names for this test.
- Definition Classes
- TestData
- abstract val text: String
The "text" for this test.
The "text" for this test.
See the main documentation for this trait for an explanation of the difference between
name
,text
, andscopes
. If a test has no surrounding scopes, this field will contain the same string asname
.- Definition Classes
- TestData
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def andThen[A](g: (Outcome) => A): (FixtureTestSuite.FixtureParam) => A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compose[A](g: (A) => FixtureTestSuite.FixtureParam): (A) => Outcome
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toNoArgTest(fixture: FixtureTestSuite.FixtureParam): FixtureTestSuite.NoArgTest
Convert this
OneArgTest
to aNoArgTest
whosename
andconfigMap
methods return the same values as thisOneArgTest
, and whoseapply
method invokes thisOneArgTest
's apply method, passing in the givenfixture
.Convert this
OneArgTest
to aNoArgTest
whosename
andconfigMap
methods return the same values as thisOneArgTest
, and whoseapply
method invokes thisOneArgTest
's apply method, passing in the givenfixture
.This method makes it easier to invoke the
withFixture
method that takes aNoArgTest
. For example, if aFixtureSuite
mixes inSeveredStackTraces
, it will inherit an implementation ofwithFixture(NoArgTest)
provided bySeveredStackTraces
that implements the stack trace severing behavior. If theFixtureSuite
does not delegate to thatwithFixture(NoArgTest)
method, the stack trace severing behavior will not happen. Here's how that might look in aFixtureSuite
whoseFixtureParam
isStringBuilder
:def withFixture(test: OneArgTest) = { withFixture(test.toNoArgTest(new StringBuilder)) }
Invoking this method has no side effect. It just returns a
NoArgTest
whoseapply
method invokesapply
on thisOneArgTest
, passing in theFixtureParam
passed totoNoArgTest
.- fixture
the
FixtureParam
- returns
an new instance of
NoArgTest
- def toString(): String
- Definition Classes
- Function1 → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()