FunSuite

munit.FunSuite
abstract class FunSuite extends BaseFunSuite

Attributes

Graph
Supertypes
trait BaseFunSuite
trait FunFixtures
trait Assertions
class Suite
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited classlikes

class FunFixture[T]

Attributes

Inherited from:
FunFixtures
Supertypes
class Object
trait Matchable
class Any
object FunFixture

Attributes

Inherited from:
FunFixtures
Supertypes
class Object
trait Matchable
class Any
final class SuiteTransform(val name: String, fn: (List[Test]) => List[Test]) extends (List[Test]) => List[Test]

Attributes

Inherited from:
SuiteTransforms
Supertypes
trait (List[Test]) => List[Test]
class Object
trait Matchable
class Any
final class TestTransform(val name: String, fn: Test => Test) extends Test => Test

Attributes

Inherited from:
TestTransforms
Supertypes
trait Test => Test
class Object
trait Matchable
class Any
final class ValueTransform(val name: String, fn: PartialFunction[Any, Future[Any]]) extends Any => Option[Future[Any]]

Attributes

Inherited from:
ValueTransforms
Supertypes
trait Any => Option[Future[Any]]
class Object
trait Matchable
class Any

Inherited types

final type AfterEach = AfterEach

Attributes

Inherited from:
Suite
final type BeforeEach = BeforeEach

Attributes

Inherited from:
Suite
final type Fixture[T] = Fixture[T]

Attributes

Inherited from:
Suite
final type Test = Test

Attributes

Inherited from:
Suite
final type TestValue = Future[Any]

The value produced by test bodies.

The value produced by test bodies.

Attributes

Inherited from:
Suite

Value members

Inherited methods

def afterAll(): Unit

Runs once after all test cases and after all suite-local fixtures have been tear down.

Runs once after all test cases and after all suite-local fixtures have been tear down.

Attributes

Inherited from:
Suite
def afterEach(context: AfterEach): Unit

Runs after each individual test case.

Runs after each individual test case.

Attributes

Inherited from:
Suite
def assert(cond: => Boolean, clue: => Any)(implicit loc: Location): Unit

Attributes

Inherited from:
Assertions
def assertEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit loc: Location, compare: Compare[A, B]): Unit

Asserts that two elements are equal according to the Compare[A, B] type-class.

Asserts that two elements are equal according to the Compare[A, B] type-class.

By default, uses == to compare values.

Attributes

Inherited from:
Assertions
def assertEqualsDouble(obtained: Double, expected: Double, delta: Double, clue: => Any)(implicit loc: Location): Unit

Asserts that two doubles are equal to within a positive delta. If the expected value is infinity then the delta value is ignored. NaNs are considered equal: assertEquals(Double.NaN, Double.NaN, *) passes.

Asserts that two doubles are equal to within a positive delta. If the expected value is infinity then the delta value is ignored. NaNs are considered equal: assertEquals(Double.NaN, Double.NaN, *) passes.

Attributes

Inherited from:
Assertions
def assertEqualsFloat(obtained: Float, expected: Float, delta: Float, clue: => Any)(implicit loc: Location): Unit

Asserts that two floats are equal to within a positive delta. If the expected value is infinity then the delta value is ignored. NaNs are considered equal: assertEquals(Float.NaN, Float.NaN, *) passes.

Asserts that two floats are equal to within a positive delta. If the expected value is infinity then the delta value is ignored. NaNs are considered equal: assertEquals(Float.NaN, Float.NaN, *) passes.

Attributes

Inherited from:
Assertions
def assertNoDiff(obtained: String, expected: String, clue: => Any)(implicit loc: Location): Unit

Attributes

Inherited from:
Assertions
def assertNotEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit loc: Location, compare: Compare[A, B]): Unit

Asserts that two elements are not equal according to the Compare[A, B] type-class.

Asserts that two elements are not equal according to the Compare[A, B] type-class.

By default, uses == to compare values.

Attributes

Inherited from:
Assertions
def assume(cond: Boolean, clue: => Any)(implicit loc: Location): Unit

Attributes

Inherited from:
Assertions
def beforeAll(): Unit

Runs once before all test cases and before all suite-local fixtures are setup. An error in this method aborts the test suite.

Runs once before all test cases and before all suite-local fixtures are setup. An error in this method aborts the test suite.

Attributes

Inherited from:
Suite
def beforeEach(context: BeforeEach): Unit

Runs before each individual test case. An error in this method aborts the test case.

Runs before each individual test case. An error in this method aborts the test case.

Attributes

Inherited from:
Suite
def clue[T](c: Clue[T]): T

Attributes

Inherited from:
Assertions
def clues(clue: Clue[_]*): Clues

Attributes

Inherited from:
Assertions
transparent inline def compileErrors(inline code: String): String

Attributes

Inherited from:
CompileErrorMacro
def fail(message: String, clues: Clues)(implicit loc: Location): Nothing

Unconditionally fails this test with the given message and optional clues.

Unconditionally fails this test with the given message and optional clues.

Attributes

Inherited from:
Assertions
def fail(message: String, cause: Throwable)(implicit loc: Location): Nothing

Unconditionally fails this test with the given message and exception marked as the cause.

Unconditionally fails this test with the given message and exception marked as the cause.

Attributes

Inherited from:
Assertions
def failComparison(message: String, obtained: Any, expected: Any, clues: Clues)(implicit loc: Location): Nothing

Unconditionally fails this test due to result of comparing two values.

Unconditionally fails this test due to result of comparing two values.

The only reason to use this method instead of fail() is if you want to allow comparing the two different values in the the IntelliJ GUI diff viewer.

Attributes

Inherited from:
Assertions
def failSuite(message: String, clues: Clues)(implicit loc: Location): Nothing

Unconditionally fail this test case and cancel all the subsequent tests in this suite.

Unconditionally fail this test case and cancel all the subsequent tests in this suite.

Attributes

Inherited from:
Assertions
def intercept[T <: Throwable](body: => Any)(implicit T: ClassTag[T], loc: Location): T

Evalutes the given expression and asserts that an exception of type T is thrown.

Evalutes the given expression and asserts that an exception of type T is thrown.

Attributes

Inherited from:
Assertions
def interceptMessage[T <: Throwable](expectedExceptionMessage: String)(body: => Any)(implicit T: ClassTag[T], loc: Location): T

Evalutes the given expression and asserts that an exception of type T with the expected message is thrown.

Evalutes the given expression and asserts that an exception of type T with the expected message is thrown.

Attributes

Inherited from:
Assertions
def isCI: Boolean

Attributes

Inherited from:
SuiteTransforms
def munitAnsiColors: Boolean

Attributes

Inherited from:
Assertions
def munitCaptureClues[T](thunk: => T): (T, Clues)

Attributes

Inherited from:
Assertions
def munitExecutionContext: ExecutionContext

Attributes

Inherited from:
Suite

Attributes

Inherited from:
TestTransforms
def munitFixtures: Seq[AnyFixture[_]]

Fixtures that can be reused for individual test cases or entire suites.

Fixtures that can be reused for individual test cases or entire suites.

Attributes

Inherited from:
Suite
def munitFlakyOK: Boolean

Attributes

Inherited from:
TestTransforms

Attributes

Inherited from:
TestTransforms

Attributes

Inherited from:
ValueTransforms
def munitIgnore: Boolean

Attributes

Inherited from:
SuiteTransforms

Attributes

Inherited from:
SuiteTransforms

Attributes

Inherited from:
SuiteTransforms
def munitPrint(clue: => Any): String

Attributes

Inherited from:
Assertions
final def munitSuiteTransform(tests: List[Test]): List[Test]

Attributes

Inherited from:
SuiteTransforms

Attributes

Inherited from:
SuiteTransforms
final def munitTestTransform(test: Test): Test

Attributes

Inherited from:
TestTransforms

Attributes

Inherited from:
TestTransforms
def munitTests(): Seq[Test]

The base class for all test suites

The base class for all test suites

Attributes

Inherited from:
BaseFunSuite
def munitTimeout: Duration

Attributes

Inherited from:
BaseFunSuite
final def munitValueTransform(testValue: => Any): Future[Any]

Attributes

Inherited from:
ValueTransforms

Attributes

Inherited from:
ValueTransforms
def printer: Printer

Attributes

Inherited from:
Assertions
def test(options: TestOptions)(body: => Any)(implicit loc: Location): Unit

Attributes

Inherited from:
BaseFunSuite
def test(name: String)(body: => Any)(implicit loc: Location): Unit

Attributes

Inherited from:
BaseFunSuite

Inherited fields

Attributes

Inherited from:
Assertions
final val munitTestsBuffer: ListBuffer[Test]

Attributes

Inherited from:
BaseFunSuite

Implicits

Inherited implicits

implicit def testOptionsFromString(name: String)(implicit loc: Location): TestOptions

Implicitly create a TestOptions given a test name. This allows writing test("name") { ... } even if test accepts a TestOptions

Implicitly create a TestOptions given a test name. This allows writing test("name") { ... } even if test accepts a TestOptions

Attributes

Inherited from:
TestOptionsConversions