WordIOSpec
Type members
Inherited classlikes
- Inherited from:
- SuiteTransforms
- Inherited from:
- ValueTransforms
Deprecated and Inherited classlikes
- Deprecated
- Inherited from:
- CatsEffectFunFixtures
Types
Value members
Inherited methods
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.
- Inherited from:
- Suite
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.
- Inherited from:
- Assertions
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.
- Inherited from:
- Assertions
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.
- Inherited from:
- Assertions
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.
- Value parameters:
- clue
a value that will be printed in case the assertions fails
- obtained
the IO under testing
- returns
the expected value
- Inherited from:
- CatsEffectAssertions
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.
- Inherited from:
- Assertions
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.
- Value parameters:
- clue
a value that will be printed in case the assertions fails
- obtained
the SyncIO under testing
- returns
the expected value
- Inherited from:
- CatsEffectAssertions
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.
- Inherited from:
- Suite
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.
- Inherited from:
- Suite
Unconditionally fails this test with the given message and optional clues.
Unconditionally fails this test with the given message and optional clues.
- Inherited from:
- Assertions
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.
- Inherited from:
- Assertions
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.
- Inherited from:
- Assertions
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.
- Inherited from:
- Assertions
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.
- Inherited from:
- Assertions
Intercepts a Throwable
being thrown inside the provided IO
.
Intercepts a Throwable
being thrown inside the provided IO
.
- Example:
val io = IO.raiseError[Unit](MyException("BOOM!")) interceptIO[MyException](io)
or
interceptIO[MyException] { IO.raiseError[Unit](MyException("BOOM!")) }
- Inherited from:
- CatsEffectAssertions
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.
- Inherited from:
- Assertions
Intercepts a Throwable
with a certain message being thrown inside the provided IO
.
Intercepts a Throwable
with a certain message being thrown inside the provided IO
.
- Example:
val io = IO.raiseError[Unit](MyException("BOOM!")) interceptIO[MyException]("BOOM!")(io)
or
interceptIO[MyException] { IO.raiseError[Unit](MyException("BOOM!")) }
- Inherited from:
- CatsEffectAssertions
Intercepts a Throwable
with a certain message being thrown inside the provided SyncIO
.
Intercepts a Throwable
with a certain message being thrown inside the provided SyncIO
.
- Example:
val io = SyncIO.raiseError[Unit](MyException("BOOM!")) interceptSyncIO[MyException]("BOOM!")(io)
or
interceptSyncIO[MyException] { SyncIO.raiseError[Unit](MyException("BOOM!")) }
- Inherited from:
- CatsEffectAssertions
Intercepts a Throwable
being thrown inside the provided SyncIO
.
Intercepts a Throwable
being thrown inside the provided SyncIO
.
- Example:
val io = SyncIO.raiseError[Unit](MyException("BOOM!")) interceptSyncIO[MyException](io)
or
interceptSyncIO[MyException] { SyncIO.raiseError[Unit](MyException("BOOM!")) }
- Inherited from:
- CatsEffectAssertions
Fixtures that can be reused for individual test cases or entire suites.
Fixtures that can be reused for individual test cases or entire suites.
- Inherited from:
- Suite
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.
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.
- Inherited from:
- CatsEffectSuite
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.
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
- Inherited from:
- CatsEffectSuite
Deprecated and Inherited methods
Inherited fields
Extensions
Implicits
Inherited implicits
- Inherited from:
- CatsEffectAssertions
- Inherited from:
- CatsEffectAssertions
- Inherited from:
- CatsEffectAssertions