c

munit

AnyFixture

abstract class AnyFixture[T] extends AnyRef

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.

See also

https://scalameta.org/munit/docs/fixtures.html

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AnyFixture
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new AnyFixture(fixtureName: String)

    fixtureName

    The name of this fixture, used for displaying an error message if beforeAll() or afterAll() fail.

Abstract Value Members

  1. abstract def apply(): T

    The value produced by this suite-local fixture that can be reused for all test cases.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def afterAll(): Any

    Runs once after the test suite has finished, regardless if the tests failed or not.

  5. def afterEach(context: AfterEach): Any

    Runs after each individual test case.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def beforeAll(): Any

    Runs once before the test suite starts

  8. def beforeEach(context: BeforeEach): Any

    Runs before each individual test case.

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

  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  13. val fixtureName: String
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped