munit
Members list
Packages
Type members
Classlikes
Attributes
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
AnyFixture allows you to acquire resources during setup and clean up resources after the tests finish running.
AnyFixture allows you to acquire resources during setup and clean up resources after the tests finish running.
Fixtures can be local to a single test case by overriding beforeEach and afterEach, or they can be re-used for an entire test suite by extending beforeAll and afterAll.
It's preferable to use a sub-class like munit.Fixture or munit.FutureFixture instead of this class. Extend this class if you're writing an integration a third-party type like Cats Resource.
Value parameters
- fixtureName
-
The name of this fixture, used for displaying an error message if
beforeAll()orafterAll()fail.
Attributes
- See also
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class Fixture[T]class FutureFixture[T]
Attributes
- Companion
- trait
- Supertypes
- Self type
-
Assertions.type
Attributes
- Companion
- object
- Supertypes
- Known subtypes
Attributes
- Supertypes
-
trait ValueTransformstrait SuiteTransformstrait TestTransformstrait TestOptionsConversionstrait FunFixturestrait Assertionstrait CompileErrorMacroclass Suitetrait PlatformSuiteclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class FunSuite
- Self type
Attributes
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
Attributes
- Companion
- object
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
A type-class that is used to compare values in MUnit assertions.
A type-class that is used to compare values in MUnit assertions.
By default, uses == and allows comparison between any two types as long they have a supertype/subtype relationship. For example:
- Compare[T, T] OK
- Compare[Some[Int], Option[Int]] OK, subtype
- Compare[Option[Int], Some[Int]] OK, supertype
- Compare[List[Int], collection.Seq[Int]] OK, subtype
- Compare[List[Int], Vector[Int]] Error, requires upcast to
Seq[Int]
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
Allows comparison between A and B when A is a subtype of B
Allows comparison between A and B when A is a subtype of B
Attributes
- Supertypes
- Known subtypes
-
object Compare
Allows comparison between A and B when B is a subtype of A.
Allows comparison between A and B when B is a subtype of A.
This implicit is defined separately from ComparePriority1 in order to avoid diverging implicit search when comparing equal types.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait ComparePriority1object Compare
The base exception for all comparison failures.
The base exception for all comparison failures.
This class exists so that it can extend org.junit.ComparisonFailure, which is recognised by IntelliJ so that users can optionally compare the obtained/expected values in a GUI diff explorer.
Value parameters
- expected
-
the expected value from this comparison.
- expectedString
-
the pretty-printed representation of the obtained value. This string is displayed in the IntelliJ diff viewer.
- location
-
the source location where this exception was thrown.
- message
-
the exception message.
- obtained
-
the obtained value from this comparison.
- obtainedString
-
the pretty-printed representation of the obtained value. This string is displayed in the IntelliJ diff viewer.
Attributes
- Supertypes
-
class ComparisonFailureclass AssertionErrorclass Errorclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Exceptions.type
Attributes
- Supertypes
-
trait FailExceptionLike[FailException]class AssertionErrorclass Errorclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class FailSuiteExceptionclass FlakyFailure
The base class for all MUnit FailExceptions.
The base class for all MUnit FailExceptions.
Implementation note: this class exists so that we could fix the issue https://youtrack.jetbrains.com/issue/SCL-18255 In order to support the JUnit comparison GUI in IntelliJ we need to extend org.junit.ComparisonFailure, which is a class and not an interface. We can't make munit.FailException extend org.junit.ComparisonFailure since not all "fail exceptions" are "comparison failures". Instead, we introduced munit.ComparisionFailException, which extends org.junit.ComparisonFailure and this base trait. Internally, MUnit should match against FailExceptionLike[_] instead of munit.FailException directly.
Attributes
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
- Known subtypes
- Self type
-
AssertionError
Attributes
- Supertypes
-
class FailExceptiontrait FailExceptionLike[FailException]class AssertionErrorclass Errorclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Fixture allows you to acquire resources during setup and clean up resources after the tests finish running.
Fixture allows you to acquire resources during setup and clean up resources after the tests finish running.
Fixtures can be local to a single test case by overriding beforeEach and afterEach, or they can be re-used for an entire test suite by extending beforeAll and afterAll.
There is no functional difference between extending Fixture[T] or AnyFixture[T]. The only difference is that an IDE will auto-complete Unit in the result type instead of Any.
Value parameters
- fixtureName
-
The name of this fixture, used for displaying an error message if
beforeAll()orafterAll()fail.
Attributes
- See also
- Supertypes
Attributes
- Supertypes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait BaseFunSuiteclass FunSuite
- Self type
Attributes
- Supertypes
-
trait BaseFunSuitetrait ValueTransformstrait SuiteTransformstrait TestTransformstrait TestOptionsConversionstrait FunFixturestrait Assertionstrait CompileErrorMacroclass Suitetrait PlatformSuiteclass Objecttrait Matchableclass AnyShow all
FutureFixture allows you to acquire resources during setup and clean up resources after the tests finish running.
FutureFixture allows you to acquire resources during setup and clean up resources after the tests finish running.
Fixtures can be local to a single test case by overriding beforeEach and afterEach, or they can be re-used for an entire test suite by extending beforeAll and afterAll.
There is no functional difference between extending FutureFixture[T] or AnyFixture[T]. The only difference is that an IDE will auto-complete Future[Unit] in the result type instead of Any.
Value parameters
- fixtureName
-
The name of this fixture, used for displaying an error message if
beforeAll()orafterAll()fail.
Attributes
- See also
- Supertypes
Attributes
- Supertypes
-
class Annotationclass Objecttrait Matchableclass Any
Attributes
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Annotationclass Objecttrait Matchableclass Any
Attributes
- Companion
- object
- Supertypes
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
MUnitRunner.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Override this class to customize the default pretty-printer.
Override this class to customize the default pretty-printer.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
The base class for all test suites. Extend this class if you don't need the functionality in FunSuite.
The base class for all test suites. Extend this class if you don't need the functionality in FunSuite.
Attributes
- Supertypes
- Known subtypes
-
trait BaseFunSuiteclass FunSuite
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait BaseFunSuiteclass FunSuite
- Self type
Attributes
- Supertypes
Metadata about a single test case.
Metadata about a single test case.
Value parameters
- body
-
the function to be evaluated for this test case.
- location
-
the file and line number where this test was defined.
- tags
-
the annotated tags for this test case.
Attributes
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
Options used when running a test. It can be built implicitly from a String (@see munit.TestOptionsConversions)
Options used when running a test. It can be built implicitly from a String (@see munit.TestOptionsConversions)
Value parameters
- name
-
the test name, used in the UI and to select it with testOnly
- tags
-
a set of munit.Tag, used to attach semantic information to a test
Attributes
- Companion
- object
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
- Self type
-
TestOptions.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait BaseFunSuiteclass FunSuite
- Self type
Values that have special treatment when evaluating values produced by tests.
Values that have special treatment when evaluating values produced by tests.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TestValues.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait BaseFunSuiteclass FunSuite
- Self type