OneArgAsyncTest

A test function taking no arguments and returning an FutureOutcome.

For more detail and examples, see the relevant section in the documentation for trait fixture.AsyncFlatSpec.

trait TestData
class Object
trait Matchable
class Any

Value members

Abstract methods

Using the passed FixtureParam, produces a FutureOutcome representing the future outcome of this asynchronous test.

Using the passed FixtureParam, produces a FutureOutcome representing the future outcome of this asynchronous test.

Value parameters:
fixture

the FixtureParam

Returns:

an instance of FutureOutcome

Concrete methods

Convert this OneArgAsyncTest to a NoArgAsyncTest whose name and configMap methods return the same values as this OneArgAsyncTest, and whose apply method invokes this OneArgAsyncTest's apply method, passing in the given fixture.

Convert this OneArgAsyncTest to a NoArgAsyncTest whose name and configMap methods return the same values as this OneArgAsyncTest, and whose apply method invokes this OneArgAsyncTest's apply method, passing in the given fixture.

This method makes it easier to invoke the withFixture method that takes a NoArgAsyncTest. Here's how that might look in a FixtureAsyncTestSuite whose FixtureParam is StringBuilder:

def withFixture(test: OneArgAsyncTest) = {
 withFixture(test.toNoArgAsyncTest(new StringBuilder))
}

Invoking this method has no side effect. It just returns a NoArgAsyncTest whose apply method invokes apply on this OneArgAsyncTest, passing in the FixtureParam passed to toNoArgAsyncTest.

Value parameters:
fixture

the FixtureParam

Returns:

an new instance of NoArgAsyncTest

Inherited methods

@unspecialized
def andThen[A](g: FutureOutcome => A): FixtureParam => A
Inherited from:
Function1
@unspecialized
def compose[A](g: A => FixtureParam): A => FutureOutcome
Inherited from:
Function1
override def toString(): String
Definition Classes
Function1 -> Any
Inherited from:
Function1

Inherited fields

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.

Inherited from:
TestData
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, and scopes.

Inherited from:
TestData
val pos: Option[Position]
Inherited from:
TestData
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, and scopes. If a test has no surrounding scopes, this field will contain an empty IndexedSeq.

Inherited from:
TestData
val tags: Set[String]

Tag names for this test.

Tag names for this test.

Inherited from:
TestData
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, and scopes. If a test has no surrounding scopes, this field will contain the same string as name.

Inherited from:
TestData