abstract class CatsEffectSuite extends FunSuite with CatsEffectAssertions with CatsEffectFixtures with CatsEffectFunFixtures
- Source
- CatsEffectSuite.scala
- Alphabetic
- By Inheritance
- CatsEffectSuite
- CatsEffectFunFixtures
- CatsEffectFixtures
- CatsEffectAssertions
- FunSuite
- BaseFunSuite
- ValueTransforms
- SuiteTransforms
- TestTransforms
- TestOptionsConversions
- FunFixtures
- Assertions
- CompileErrorMacro
- Suite
- PlatformSuite
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new CatsEffectSuite()
Type Members
-
implicit
class
MUnitCatsAssertionsForIOBooleanOps extends AnyRef
- Definition Classes
- CatsEffectAssertions
-
implicit
class
MUnitCatsAssertionsForIOOps[A] extends AnyRef
- Definition Classes
- CatsEffectAssertions
-
implicit
class
MUnitCatsAssertionsForIOUnitOps extends AnyRef
- Definition Classes
- CatsEffectAssertions
-
implicit
class
MUnitCatsAssertionsForSyncIOOps[A] extends AnyRef
- Definition Classes
- CatsEffectAssertions
-
implicit
class
MUnitCatsAssertionsForSyncIOUnitOps extends AnyRef
- Definition Classes
- CatsEffectAssertions
-
implicit
class
SyncIOFunFixtureOps[T] extends AnyRef
- Definition Classes
- CatsEffectFunFixtures
-
final
type
AfterEach = munit.AfterEach
- Definition Classes
- Suite
-
final
type
BeforeEach = munit.BeforeEach
- Definition Classes
- Suite
-
final
type
Fixture[T] = munit.Fixture[T]
- Definition Classes
- Suite
-
class
FunFixture[T] extends AnyRef
- Definition Classes
- FunFixtures
-
final
class
SuiteTransform extends (List[BaseFunSuite.Test]) ⇒ List[BaseFunSuite.Test]
- Definition Classes
- SuiteTransforms
-
final
type
Test = munit.Test
- Definition Classes
- Suite
-
final
class
TestTransform extends (BaseFunSuite.Test) ⇒ BaseFunSuite.Test
- Definition Classes
- TestTransforms
-
final
type
TestValue = Future[Any]
- Definition Classes
- Suite
-
final
class
ValueTransform extends (Any) ⇒ Option[Future[Any]]
- Definition Classes
- ValueTransforms
Value Members
-
object
ResourceSuiteLocalFixture
- Definition Classes
- CatsEffectFixtures
-
object
ResourceTestLocalFixture
- Definition Classes
- CatsEffectFixtures
-
object
ResourceFunFixture
- Definition Classes
- CatsEffectFunFixtures
-
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
afterAll(): Unit
- Definition Classes
- Suite
-
def
afterEach(context: AfterEach): Unit
- Definition Classes
- Suite
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
assert(cond: ⇒ Boolean, clue: ⇒ Any)(implicit loc: Location): Unit
- Definition Classes
- Assertions
-
def
assertEquals[A, B](obtained: A, expected: B, clue: ⇒ Any)(implicit loc: Location, compare: Compare[A, B]): Unit
- Definition Classes
- Assertions
-
def
assertEqualsDouble(obtained: Double, expected: Double, delta: Double, clue: ⇒ Any)(implicit loc: Location): Unit
- Definition Classes
- Assertions
-
def
assertEqualsFloat(obtained: Float, expected: Float, delta: Float, clue: ⇒ Any)(implicit loc: Location): Unit
- Definition Classes
- Assertions
-
def
assertIO[A, B](obtained: IO[A], returns: B, clue: ⇒ Any = "values are not the same")(implicit loc: Location, ev: <:<[B, A]): IO[Unit]
Asserts that an
IO
returns an expected value.Asserts that an
IO
returns an expected value.The "returns" value (second argument) must have the same type or be a subtype of the one "contained" inside the
IO
(first argument). For example:assertIO(IO(Option(1)), returns = Some(1)) // OK assertIO(IO(Some(1)), returns = Option(1)) // Error: Option[Int] is not a subtype of Some[Int]
The "clue" value can be used to give extra information about the failure in case the assertion fails.
- obtained
the IO under testing
- returns
the expected value
- clue
a value that will be printed in case the assertions fails
- Definition Classes
- CatsEffectAssertions
-
def
assertIOBoolean(obtained: IO[Boolean], clue: ⇒ Any = "values are not the same")(implicit loc: Location): IO[Unit]
Asserts that an
IO[Boolean]
returns true.Asserts that an
IO[Boolean]
returns true.For example:
assertIOBoolean(IO(true))
The "clue" value can be used to give extra information about the failure in case the assertion fails.
- obtained
the IO[Boolean] under testing
- clue
a value that will be printed in case the assertions fails
- Attributes
- protected
- Definition Classes
- CatsEffectAssertions
-
def
assertIO_(obtained: IO[Unit], clue: ⇒ Any = "value is not ()")(implicit loc: Location): IO[Unit]
Asserts that an
IO[Unit]
returns the Unit value.Asserts that an
IO[Unit]
returns the Unit value.For example:
assertIO_(IO.unit)
The "clue" value can be used to give extra information about the failure in case the assertion fails.
- obtained
the IO under testing
- clue
a value that will be printed in case the assertions fails
- Attributes
- protected
- Definition Classes
- CatsEffectAssertions
-
def
assertNoDiff(obtained: String, expected: String, clue: ⇒ Any)(implicit loc: Location): Unit
- Definition Classes
- Assertions
-
def
assertNotEquals[A, B](obtained: A, expected: B, clue: ⇒ Any)(implicit loc: Location, compare: Compare[A, B]): Unit
- Definition Classes
- Assertions
-
def
assertSyncIO[A, B](obtained: SyncIO[A], returns: B, clue: ⇒ Any = "values are not the same")(implicit loc: Location, ev: <:<[B, A]): SyncIO[Unit]
Asserts that a
SyncIO
returns an expected value.Asserts that a
SyncIO
returns an expected value.The "returns" value (second argument) must have the same type or be a subtype of the one "contained" inside the
SyncIO
(first argument). For example:assertSyncIO(SyncIO(Option(1)), returns = Some(1)) // OK assertSyncIO(SyncIO(Some(1)), returns = Option(1)) // Error: Option[Int] is not a subtype of Some[Int]
The "clue" value can be used to give extra information about the failure in case the assertion fails.
- obtained
the SyncIO under testing
- returns
the expected value
- clue
a value that will be printed in case the assertions fails
- Definition Classes
- CatsEffectAssertions
-
def
assertSyncIO_(obtained: SyncIO[Unit], clue: ⇒ Any = "value is not ()")(implicit loc: Location): SyncIO[Unit]
Asserts that a
SyncIO[Unit]
returns the Unit value.Asserts that a
SyncIO[Unit]
returns the Unit value.For example:
assertSyncIO_(SyncIO.unit) // OK
The "clue" value can be used to give extra information about the failure in case the assertion fails.
- obtained
the SyncIO under testing
- clue
a value that will be printed in case the assertions fails
- Attributes
- protected
- Definition Classes
- CatsEffectAssertions
-
def
assume(cond: Boolean, clue: ⇒ Any)(implicit loc: Location): Unit
- Definition Classes
- Assertions
-
def
beforeAll(): Unit
- Definition Classes
- Suite
-
def
beforeEach(context: BeforeEach): Unit
- Definition Classes
- Suite
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
clue[T](c: Clue[T]): T
- Definition Classes
- Assertions
-
def
clues(clue: Clue[_]*): Clues
- Definition Classes
- Assertions
-
macro
def
compileErrors(code: String): String
- Definition Classes
- CompileErrorMacro
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fail(message: String, clues: Clues)(implicit loc: Location): Nothing
- Definition Classes
- Assertions
-
def
fail(message: String, cause: Throwable)(implicit loc: Location): Nothing
- Definition Classes
- Assertions
-
def
failComparison(message: String, obtained: Any, expected: Any, clues: Clues)(implicit loc: Location): Nothing
- Definition Classes
- Assertions
-
def
failSuite(message: String, clues: Clues)(implicit loc: Location): Nothing
- Definition Classes
- Assertions
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
intercept[T <: Throwable](body: ⇒ Any)(implicit T: ClassTag[T], loc: Location): T
- Definition Classes
- Assertions
-
def
interceptIO[T <: Throwable](io: IO[Any])(implicit T: ClassTag[T], loc: Location): IO[T]
Intercepts a
Throwable
being thrown inside the providedIO
.Intercepts a
Throwable
being thrown inside the providedIO
.- Definition Classes
- CatsEffectAssertions
val io = IO.raiseError[Unit](MyException("BOOM!")) interceptIO[MyException](io)
or
interceptIO[MyException] { IO.raiseError[Unit](MyException("BOOM!")) }
Example: -
def
interceptMessage[T <: Throwable](expectedExceptionMessage: String)(body: ⇒ Any)(implicit T: ClassTag[T], loc: Location): T
- Definition Classes
- Assertions
-
def
interceptMessageIO[T <: Throwable](expectedExceptionMessage: String)(io: IO[Any])(implicit T: ClassTag[T], loc: Location): IO[T]
Intercepts a
Throwable
with a certain message being thrown inside the providedIO
.Intercepts a
Throwable
with a certain message being thrown inside the providedIO
.- Definition Classes
- CatsEffectAssertions
val io = IO.raiseError[Unit](MyException("BOOM!")) interceptIO[MyException]("BOOM!")(io)
or
interceptIO[MyException] { IO.raiseError[Unit](MyException("BOOM!")) }
Example: -
def
interceptMessageSyncIO[T <: Throwable](expectedExceptionMessage: String)(io: SyncIO[Any])(implicit T: ClassTag[T], loc: Location): SyncIO[T]
Intercepts a
Throwable
with a certain message being thrown inside the providedSyncIO
.Intercepts a
Throwable
with a certain message being thrown inside the providedSyncIO
.- Definition Classes
- CatsEffectAssertions
val io = SyncIO.raiseError[Unit](MyException("BOOM!")) interceptSyncIO[MyException]("BOOM!")(io)
or
interceptSyncIO[MyException] { SyncIO.raiseError[Unit](MyException("BOOM!")) }
Example: -
def
interceptSyncIO[T <: Throwable](io: SyncIO[Any])(implicit T: ClassTag[T], loc: Location): SyncIO[T]
Intercepts a
Throwable
being thrown inside the providedSyncIO
.Intercepts a
Throwable
being thrown inside the providedSyncIO
.- Definition Classes
- CatsEffectAssertions
val io = SyncIO.raiseError[Unit](MyException("BOOM!")) interceptSyncIO[MyException](io)
or
interceptSyncIO[MyException] { SyncIO.raiseError[Unit](MyException("BOOM!")) }
Example: -
def
isCI: Boolean
- Definition Classes
- SuiteTransforms
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
munitAnsiColors: Boolean
- Definition Classes
- Assertions
-
def
munitCaptureClues[T](thunk: ⇒ T): (T, Clues)
- Definition Classes
- Assertions
-
implicit
def
munitExecutionContext: ExecutionContext
- Definition Classes
- CatsEffectSuite → Suite
-
final
def
munitFailTransform: TestTransform
- Definition Classes
- TestTransforms
-
def
munitFixtures: Seq[AnyFixture[_]]
- Definition Classes
- Suite
-
def
munitFlakyOK: Boolean
- Definition Classes
- TestTransforms
-
final
def
munitFlakyTransform: TestTransform
- Definition Classes
- TestTransforms
-
final
def
munitFutureTransform: ValueTransform
- Definition Classes
- ValueTransforms
- implicit def munitIORuntime: IORuntime
-
def
munitIOTimeout: Duration
The timeout for IO-based tests.
The timeout for IO-based tests. When it expires it will gracefully cancel the fiber running the test and invoke any finalizers before ultimately failing the test.
Note that the fiber may still hang while running finalizers or even be uncancelable. In this case the munitTimeout will take effect, with the caveat that the hanging fiber will be leaked.
-
def
munitIgnore: Boolean
- Definition Classes
- SuiteTransforms
-
final
def
munitIgnoreSuiteTransform: SuiteTransform
- Definition Classes
- SuiteTransforms
-
val
munitLines: Lines
- Definition Classes
- Assertions
-
final
def
munitOnlySuiteTransform: SuiteTransform
- Definition Classes
- SuiteTransforms
-
def
munitPrint(clue: ⇒ Any): String
- Definition Classes
- Assertions
-
final
def
munitSuiteTransform(tests: List[Test]): List[Test]
- Definition Classes
- SuiteTransforms
-
def
munitSuiteTransforms: List[SuiteTransform]
- Definition Classes
- SuiteTransforms
-
final
def
munitTestTransform(test: Test): Test
- Definition Classes
- TestTransforms
-
def
munitTestTransforms: List[TestTransform]
- Definition Classes
- TestTransforms
-
def
munitTests(): Seq[Test]
- Definition Classes
- BaseFunSuite → Suite
-
final
val
munitTestsBuffer: ListBuffer[Test]
- Definition Classes
- BaseFunSuite
-
def
munitTimeout: Duration
The overall timeout applicable to all tests in the suite, including those written in terms of Future or synchronous code.
The overall timeout applicable to all tests in the suite, including those written in terms of Future or synchronous code. This is implemented by the MUnit framework itself.
When this timeout expires, the suite will immediately fail the test and proceed without waiting for its cancelation or even attempting to cancel it. For that reason it is recommended to set this to a greater value than munitIOTimeout, which performs graceful cancelation of IO-based tests. The default grace period for cancelation is 1 second.
- Definition Classes
- CatsEffectSuite → BaseFunSuite
-
final
def
munitValueTransform(testValue: ⇒ Any): Future[Any]
- Definition Classes
- ValueTransforms
-
def
munitValueTransforms: List[ValueTransform]
- Definition Classes
- CatsEffectSuite → ValueTransforms
-
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
test(options: TestOptions)(body: ⇒ Any)(implicit loc: Location): Unit
- Definition Classes
- BaseFunSuite
-
def
test(name: String)(body: ⇒ Any)(implicit loc: Location): Unit
- Definition Classes
- BaseFunSuite
-
implicit
def
testOptionsFromString(name: String)(implicit loc: Location): TestOptions
- Definition Classes
- TestOptionsConversions
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
object
FunFixture
- Definition Classes
- FunFixtures
Deprecated Value Members
-
object
UnsafeResourceSuiteLocalDeferredFixture
- Definition Classes
- CatsEffectFixtures
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) Use ResourceSuiteLocalFixture
-
object
ResourceFixture
- Definition Classes
- CatsEffectFunFixtures
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) Use ResourceFunFixture
-
def
munitIoRuntime: IORuntime
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) Use munitIORuntime