Http4sAuthedRoutesSuite

munit.Http4sAuthedRoutesSuite
abstract class Http4sAuthedRoutesSuite[A] extends Http4sSuite

Base class for suites testing AuthedRoutes.

To use this class you'll need to provide the routes being tested by overriding routes.

Ensure that a Show instance for the request's context type is in scope. This instance will be used to include the context's information in the test's name.

Attributes

Example
import cats.effect.IO
import org.http4s.AuthedRoutes
class MyAuthedRoutesSuite extends munit.Http4sAuthedRoutesSuite[String] {
 override val routes: AuthedRoutes[String, IO] = AuthedRoutes.of {
   case GET -> Root / "hello" as user => Ok(user + " says Hi")
 }
 test(GET(uri"hello").as("Jose")) { response =>
   assertIO(response.as[String], "Jose says Hi")
 }
}
Deprecated
[Since version 0.16.0]
Graph
Supertypes
trait Http4sSuite
trait AllSyntax
trait HeaderSyntax
trait LiteralsSyntax
trait StringSyntax
trait KleisliSyntax
trait Http4sClientDsl[IO]
trait Http4sDsl[IO]
trait Http4sDsl2[IO, IO]
trait Responses[IO, IO]
trait Statuses
trait RequestDsl
trait Auth
trait Methods
class CatsEffectSuite
trait CatsEffectFunFixtures
trait CatsEffectFixtures
trait CatsEffectAssertions
class FunSuite
trait BaseFunSuite
trait ValueTransforms
trait SuiteTransforms
trait TestTransforms
trait TestOptionsConversions
trait FunFixtures
trait Assertions
trait CompileErrorMacro
class Suite
trait PlatformSuite
class Object
trait Matchable
class Any
Show all

Members list

Type members

Classlikes

implicit class AuthedRoutesCompanionOps(companion: AuthedRoutes.type)

Attributes

Supertypes
class Object
trait Matchable
class Any
implicit class Request2AuthedRequest(request: Request[IO])

Attributes

Supertypes
class Object
trait Matchable
class Any

Inherited classlikes

final implicit class ClientFunFixtureTestOps(fixture: SyncIO[FunFixture[Client[IO]]]) extends SyncIOFunFixtureOps[Client[IO]]

Attributes

Inherited from:
Http4sSuite
Supertypes
class CatsEffectFunFixtures.this.SyncIOFunFixtureOps[Client[IO]]
class Object
trait Matchable
class Any
case class ContextNotFound(request: Request[IO]) extends RuntimeException, NoStackTrace

Attributes

Inherited from:
Http4sMUnitSyntax
Supertypes
trait Product
trait Equals
trait NoStackTrace
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
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
implicit class Http4sMUnitAuthedRequestTypeOps(t: AuthedRequest.type)

Attributes

Inherited from:
Http4sMUnitSyntax
Supertypes
class Object
trait Matchable
class Any
implicit class Http4sMUnitClientOps(client: Client[IO])

Attributes

Inherited from:
Http4sMUnitSyntax
Supertypes
class Object
trait Matchable
class Any
implicit class Http4sMUnitClientTypeOps(t: Client.type)

Attributes

Inherited from:
Http4sMUnitSyntax
Supertypes
class Object
trait Matchable
class Any
final implicit class Http4sMUnitHttpAppOps[A](httpApp: HttpApp[IO])

Attributes

Inherited from:
Http4sMUnitSyntax
Supertypes
class Object
trait Matchable
class Any
final implicit class Http4sMUnitKleisliResponseOps[A](kleisli: Kleisli[[_] =>> OptionT[IO, _$3], A, Response[IO]])

Attributes

Inherited from:
Http4sMUnitSyntax
Supertypes
class Object
trait Matchable
class Any
implicit class Http4sMUnitRequestOps(request: Request[IO])

Attributes

Inherited from:
Http4sMUnitSyntax
Supertypes
class Object
trait Matchable
class Any

Attributes

Inherited from:
Http4sSuite
Supertypes
class Object
trait Matchable
class Any
implicit class Http4sMUnitUriOps(uri: Uri)

Attributes

Inherited from:
Http4sMUnitSyntax
Supertypes
class Object
trait Matchable
class Any
final implicit class Http4sMunitCIStringOps(ci: CIString)

Attributes

Inherited from:
Http4sMUnitSyntax
Supertypes
class Object
trait Matchable
class Any
implicit class MUnitCatsAssertionsForIOBooleanOps(io: IO[Boolean])

Attributes

Inherited from:
CatsEffectAssertions
Supertypes
class Object
trait Matchable
class Any
implicit class MUnitCatsAssertionsForIOOps[A](io: IO[A])

Attributes

Inherited from:
CatsEffectAssertions
Supertypes
class Object
trait Matchable
class Any
implicit class MUnitCatsAssertionsForIOUnitOps(io: IO[Unit])

Attributes

Inherited from:
CatsEffectAssertions
Supertypes
class Object
trait Matchable
class Any
implicit class MUnitCatsAssertionsForSyncIOOps[A](io: SyncIO[A])

Attributes

Inherited from:
CatsEffectAssertions
Supertypes
class Object
trait Matchable
class Any
implicit class MUnitCatsAssertionsForSyncIOUnitOps(io: SyncIO[Unit])

Attributes

Inherited from:
CatsEffectAssertions
Supertypes
class Object
trait Matchable
class Any

Attributes

Inherited from:
CatsEffectFunFixtures
Supertypes
class Object
trait Matchable
class Any

Attributes

Inherited from:
CatsEffectFixtures
Supertypes
class Object
trait Matchable
class Any

Attributes

Inherited from:
CatsEffectFixtures
Supertypes
class Object
trait Matchable
class Any
implicit class ResponseCluesOps(response: Response[IO])

Attributes

Inherited from:
Http4sSuite
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
implicit class SyncIOFunFixtureOps[T](fixture: SyncIO[FunFixture[T]])

Attributes

Inherited from:
CatsEffectFunFixtures
Supertypes
class Object
trait Matchable
class Any
Known subtypes
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
object as

Attributes

Inherited from:
Auth
Supertypes
class Object
trait Matchable
class Any

Deprecated and Inherited classlikes

Attributes

Deprecated
true
Inherited from:
CatsEffectFunFixtures
Supertypes
class Object
trait Matchable
class Any

Attributes

Deprecated
true
Inherited from:
CatsEffectFixtures
Supertypes
class Object
trait Matchable
class Any

Inherited types

type / = /.type

Attributes

Inherited from:
RequestDsl
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
type FlagQueryParamMatcher = FlagQueryParamMatcher

Attributes

Inherited from:
RequestDsl
type MethodConcat = MethodConcat

Attributes

Inherited from:
RequestDsl
type OptionalMultiQueryParamDecoderMatcher[T] = OptionalMultiQueryParamDecoderMatcher[T]

Attributes

Inherited from:
RequestDsl
type OptionalQueryParamDecoderMatcher[T] = OptionalQueryParamDecoderMatcher[T]

Attributes

Inherited from:
RequestDsl
type OptionalQueryParamMatcher[T] = OptionalQueryParamMatcher[T]

Attributes

Inherited from:
RequestDsl
type OptionalValidatingQueryParamDecoderMatcher[T] = OptionalValidatingQueryParamDecoderMatcher[T]

Attributes

Inherited from:
RequestDsl
type Path = Path

Attributes

Inherited from:
RequestDsl
type QueryParamDecoderMatcher[T] = QueryParamDecoderMatcher[T]

Attributes

Inherited from:
RequestDsl
type QueryParamDecoderMatcherWithDefault[T] = QueryParamDecoderMatcherWithDefault[T]

Attributes

Inherited from:
RequestDsl
type QueryParamMatcher[T] = QueryParamMatcher[T]

Attributes

Inherited from:
RequestDsl
type Root = Root.type

Attributes

Inherited from:
RequestDsl
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
type ValidatingQueryParamDecoderMatcher[T] = ValidatingQueryParamDecoderMatcher[T]

Attributes

Inherited from:
RequestDsl

Value members

Concrete methods

override def http4sMUnitClientFixture: SyncIO[FunFixture[Client[IO]]]

Fixture that creates the client which will be used to execute this suite's requests.

Fixture that creates the client which will be used to execute this suite's requests.

Attributes

Definition Classes
override def test(request: Request[IO]): Http4sMUnitTestCreator

Declares a test for the provided request. That request will be executed using the routes provided in routes.

Declares a test for the provided request. That request will be executed using the routes provided in routes.

Attributes

Example
test(GET(uri"users" / 42).context("user-1")) { response =>
   // test body
}
test(POST(json, uri"users") -> "user-2").alias("Create a new user") { response =>
   // test body
}
test(GET(uri"users" / 42).context("user-3")).flaky { response =>
   // test body
}
Definition Classes

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 assertIO[A, B](obtained: IO[A], returns: B, clue: => Any)(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.

Value parameters

clue

a value that will be printed in case the assertions fails

obtained

the IO under testing

returns

the expected value

Attributes

Inherited from:
CatsEffectAssertions
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 assertSyncIO[A, B](obtained: SyncIO[A], returns: B, clue: => Any)(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.

Value parameters

clue

a value that will be printed in case the assertions fails

obtained

the SyncIO under testing

returns

the expected value

Attributes

Inherited from:
CatsEffectAssertions
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 http4sMUnitBodyPrettifier(body: String): String

Allows prettifing the response's body before outputting it to logs.

Allows prettifing the response's body before outputting it to logs.

By default it will try to parse it as JSON and apply a code highlight if munitAnsiColors is true.

Value parameters

body

the response's body to prettify

Attributes

Returns

the prettified version of the response's body

Inherited from:
Http4sSuite
def http4sMUnitResponseClueCreator(response: Response[IO]): Clues

Returns the response as suite clues.

Returns the response as suite clues.

This method is then used by response.clues extension method.

Value parameters

response

the response to convert to Clues

Attributes

Returns

the clues extracted from the response

Inherited from:
Http4sSuite

Allows altering the name of the generated tests.

Allows altering the name of the generated tests.

By default it will generate test names like:

// GET -> users/42
test(GET(uri"users" / 42))

// GET -> users (All users)
test(GET(uri"users")).alias("All users")

// GET -> users as user-1
test(GET(uri"users").as("user-1"))

// GET -> users - executed 10 times with 2 in parallel
test(GET(uri"users")).repeat(10).parallel(2)

// GET -> users (retrieve the list of users and get the first user from the list)
test(GET(uri"users"))
   .alias("retrieve the list of users")
   .andThen("get the first user from the list")(_.as[List[User]].flatMap {
     case Nil               => fail("The list of users should not be empty")
     case (head: User) :: _ => GET(uri"users" / head.id.show)
   })

Attributes

Inherited from:
Http4sSuite
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 interceptIO[T <: Throwable](io: IO[Any])(implicit T: ClassTag[T], loc: Location): IO[T]

Intercepts a Throwable being thrown inside the provided IO.

Intercepts a Throwable being thrown inside the provided IO.

Attributes

Example
 val io = IO.raiseError[Unit](MyException("BOOM!"))
 interceptIO[MyException](io)

or

 interceptIO[MyException] {
     IO.raiseError[Unit](MyException("BOOM!"))
 }
Inherited from:
CatsEffectAssertions
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 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 provided IO.

Intercepts a Throwable with a certain message being thrown inside the provided IO.

Attributes

Example
 val io = IO.raiseError[Unit](MyException("BOOM!"))
 interceptIO[MyException]("BOOM!")(io)

or

 interceptIO[MyException] {
     IO.raiseError[Unit](MyException("BOOM!"))
 }
Inherited from:
CatsEffectAssertions
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 provided SyncIO.

Intercepts a Throwable with a certain message being thrown inside the provided SyncIO.

Attributes

Example
 val io = SyncIO.raiseError[Unit](MyException("BOOM!"))
 interceptSyncIO[MyException]("BOOM!")(io)

or

 interceptSyncIO[MyException] {
     SyncIO.raiseError[Unit](MyException("BOOM!"))
 }
Inherited from:
CatsEffectAssertions
def interceptSyncIO[T <: Throwable](io: SyncIO[Any])(implicit T: ClassTag[T], loc: Location): SyncIO[T]

Intercepts a Throwable being thrown inside the provided SyncIO.

Intercepts a Throwable being thrown inside the provided SyncIO.

Attributes

Example
 val io = SyncIO.raiseError[Unit](MyException("BOOM!"))
 interceptSyncIO[MyException](io)

or

 interceptSyncIO[MyException] {
     SyncIO.raiseError[Unit](MyException("BOOM!"))
 }
Inherited from:
CatsEffectAssertions
def isCI: Boolean

Attributes

Inherited from:
SuiteTransforms
def localhost: Uri

Alias for http://localhost

Alias for http://localhost

Attributes

Inherited from:
Http4sMUnitSyntax
def munitAnsiColors: Boolean

Attributes

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

Attributes

Inherited from:
Assertions

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 munitIOTimeout: Duration

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.

Attributes

Inherited from:
CatsEffectSuite
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
override def munitTimeout: Duration

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.

Attributes

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

Attributes

Inherited from:
ValueTransforms
override def munitValueTransforms: List[ValueTransform]

Attributes

Definition Classes
CatsEffectSuite -> ValueTransforms
Inherited from:
CatsEffectSuite
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

Deprecated and Inherited methods

def http4sMUnitFunFixture: SyncIO[FunFixture[(Request[IO]) => Resource[IO, Response[IO]]]]

Fixture to run a request against this suite

Fixture to run a request against this suite

Attributes

Deprecated
[Since version 0.16.0]
Inherited from:
Http4sSuite
def http4sMUnitNameCreator(request: Request[IO], followingRequests: List[String], testOptions: TestOptions, config: Http4sMUnitConfig): String

Allows altering the name of the generated tests.

Allows altering the name of the generated tests.

By default it will generate test names like:

// GET -> users/42
test(GET(uri"users" / 42))

// GET -> users (All users)
test(GET(uri"users")).alias("All users")

// GET -> users as user-1
test(GET(uri"users").as("user-1"))

// GET -> users - executed 10 times with 2 in parallel
test(GET(uri"users")).repeat(10).parallel(2)

// GET -> users (retrieve the list of users and get the first user from the list)
test(GET(uri"users"))
   .alias("retrieve the list of users")
   .andThen("get the first user from the list")(_.as[List[User]].flatMap {
     case Nil               => fail("The list of users should not be empty")
     case (head: User) :: _ => GET(uri"users" / head.id.show)
   })

Value parameters

config

the configuration for this test

followingRequests

the following request' aliases

request

the test's request

testOptions

the options for the current test

Attributes

Returns

the test's name

Deprecated
[Since version 0.16.0] Use `http4sMUnitTestNameCreator` instead
Inherited from:
Http4sSuite
def http4sMUnitNameCreatorReplacements(): Seq[(String, String)]

List of replacements that will be applied to the result of http4sMUnitNameCreator using String#replaceAll

List of replacements that will be applied to the result of http4sMUnitNameCreator using String#replaceAll

Attributes

Deprecated
[Since version 0.16.0] Override `http4sMUnitTestNameCreator` instead and provide replacements to `default` constructor
Inherited from:
Http4sSuite
def munitIoRuntime: IORuntime

Attributes

Deprecated
true
Inherited from:
CatsEffectSuite

Abstract fields

val routes: AuthedRoutes[A, IO]

The HTTP routes being tested

The HTTP routes being tested

Attributes

Inherited fields

val +&: +&.type

Attributes

Inherited from:
Http4sDsl2
val ->: ->.type

Attributes

Inherited from:
Http4sDsl2
val /: /.type

Attributes

Inherited from:
Http4sDsl2
val /:: /:.type

Attributes

Inherited from:
Http4sDsl2
val :?: :?.type

Attributes

Inherited from:
Http4sDsl2
val Accepted: Accepted.type

Attributes

Inherited from:
Statuses
val AlreadyReported: AlreadyReported.type

Attributes

Inherited from:
Statuses
val BadGateway: BadGateway.type

Attributes

Inherited from:
Statuses
val BadRequest: BadRequest.type

Attributes

Inherited from:
Statuses
val CONNECT: CONNECT.type

Attributes

Inherited from:
Methods
val Conflict: Conflict.type

Attributes

Inherited from:
Statuses
val Continue: Continue.type

Attributes

Inherited from:
Statuses
val Created: Created.type

Attributes

Inherited from:
Statuses
val DELETE: DELETE.type

Attributes

Inherited from:
Methods
val ExpectationFailed: ExpectationFailed.type

Attributes

Inherited from:
Statuses
val FailedDependency: FailedDependency.type

Attributes

Inherited from:
Statuses
val Forbidden: Forbidden.type

Attributes

Inherited from:
Statuses
val Found: Found.type

Attributes

Inherited from:
Statuses
val GET: GET.type

Attributes

Inherited from:
Methods
val GatewayTimeout: GatewayTimeout.type

Attributes

Inherited from:
Statuses
val Gone: Gone.type

Attributes

Inherited from:
Statuses
val HEAD: HEAD.type

Attributes

Inherited from:
Methods
val HttpVersionNotSupported: HttpVersionNotSupported.type

Attributes

Inherited from:
Statuses
val IMUsed: IMUsed.type

Attributes

Inherited from:
Statuses
val InsufficientStorage: InsufficientStorage.type

Attributes

Inherited from:
Statuses
val IntVar: IntVar.type

Attributes

Inherited from:
Http4sDsl2
val InternalServerError: InternalServerError.type

Attributes

Inherited from:
Statuses
val LengthRequired: LengthRequired.type

Attributes

Inherited from:
Statuses
val Locked: Locked.type

Attributes

Inherited from:
Statuses
val LongVar: LongVar.type

Attributes

Inherited from:
Http4sDsl2
val LoopDetected: LoopDetected.type

Attributes

Inherited from:
Statuses
val MethodNotAllowed: MethodNotAllowed.type

Attributes

Inherited from:
Statuses
val MovedPermanently: MovedPermanently.type

Attributes

Inherited from:
Statuses
val MultiStatus: MultiStatus.type

Attributes

Inherited from:
Statuses
val MultipleChoices: MultipleChoices.type

Attributes

Inherited from:
Statuses
val NetworkAuthenticationRequired: NetworkAuthenticationRequired.type

Attributes

Inherited from:
Statuses
val NoContent: NoContent.type

Attributes

Inherited from:
Statuses
val NonAuthoritativeInformation: NonAuthoritativeInformation.type

Attributes

Inherited from:
Statuses
val NotAcceptable: NotAcceptable.type

Attributes

Inherited from:
Statuses
val NotExtended: NotExtended.type

Attributes

Inherited from:
Statuses
val NotFound: NotFound.type

Attributes

Inherited from:
Statuses
val NotImplemented: NotImplemented.type

Attributes

Inherited from:
Statuses
val NotModified: NotModified.type

Attributes

Inherited from:
Statuses
val OPTIONS: OPTIONS.type

Attributes

Inherited from:
Methods
val Ok: Ok.type

Attributes

Inherited from:
Statuses
val PATCH: PATCH.type

Attributes

Inherited from:
Methods
val POST: POST.type

Attributes

Inherited from:
Methods
val PUT: PUT.type

Attributes

Inherited from:
Methods
val PartialContent: PartialContent.type

Attributes

Inherited from:
Statuses
val Path: Path.type

Attributes

Inherited from:
Http4sDsl2
val PayloadTooLarge: PayloadTooLarge.type

Attributes

Inherited from:
Statuses
val PaymentRequired: PaymentRequired.type

Attributes

Inherited from:
Statuses
val PermanentRedirect: PermanentRedirect.type

Attributes

Inherited from:
Statuses
val PreconditionFailed: PreconditionFailed.type

Attributes

Inherited from:
Statuses
val PreconditionRequired: PreconditionRequired.type

Attributes

Inherited from:
Statuses
val Processing: Processing.type

Attributes

Inherited from:
Statuses
val ProxyAuthenticationRequired: ProxyAuthenticationRequired.type

Attributes

Inherited from:
Statuses
val RangeNotSatisfiable: RangeNotSatisfiable.type

Attributes

Inherited from:
Statuses
val RequestHeaderFieldsTooLarge: RequestHeaderFieldsTooLarge.type

Attributes

Inherited from:
Statuses
val RequestTimeout: RequestTimeout.type

Attributes

Inherited from:
Statuses
val ResetContent: ResetContent.type

Attributes

Inherited from:
Statuses
val Root: Root.type

Attributes

Inherited from:
Http4sDsl2
val SeeOther: SeeOther.type

Attributes

Inherited from:
Statuses
val ServiceUnavailable: ServiceUnavailable.type

Attributes

Inherited from:
Statuses
val SwitchingProtocols: SwitchingProtocols.type

Attributes

Inherited from:
Statuses
val TRACE: TRACE.type

Attributes

Inherited from:
Methods
val TemporaryRedirect: TemporaryRedirect.type

Attributes

Inherited from:
Statuses
val TooManyRequests: TooManyRequests.type

Attributes

Inherited from:
Statuses
val UUIDVar: UUIDVar.type

Attributes

Inherited from:
Http4sDsl2
val Unauthorized: Unauthorized.type

Attributes

Inherited from:
Statuses
val UnavailableForLegalReasons: UnavailableForLegalReasons.type

Attributes

Inherited from:
Statuses
val UnprocessableEntity: UnprocessableEntity.type

Attributes

Inherited from:
Statuses
val UnsupportedMediaType: UnsupportedMediaType.type

Attributes

Inherited from:
Statuses
val UpgradeRequired: UpgradeRequired.type

Attributes

Inherited from:
Statuses
val UriTooLong: UriTooLong.type

Attributes

Inherited from:
Statuses
val UseProxy: UseProxy.type

Attributes

Inherited from:
Statuses
val VariantAlsoNegotiates: VariantAlsoNegotiates.type

Attributes

Inherited from:
Statuses
val liftG: FunctionK[IO, IO]

Attributes

Inherited from:
Http4sDsl
val munitLines: Lines

Attributes

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

Attributes

Inherited from:
BaseFunSuite
val ~: ~.type

Attributes

Inherited from:
Http4sDsl2
val →: ->.type

Alias for ->.

Alias for ->.

Note: Due to infix operation precedence, → has a lower priority than /. So you have to use parentheses in pattern matching when using this operator.

For example:

 (request.method, Path(request.path)) match {
   case Method.GET → (Root / "test.json") => ...

Attributes

Inherited from:
Http4sDsl2

Extensions

Inherited extensions

extension (inline ctx: StringContext)
inline def mediaType(inline args: Any*): MediaType

Attributes

Inherited from:
LiteralsSyntax
inline def path(inline args: Any*): Path

Attributes

Inherited from:
LiteralsSyntax
inline def qValue(inline args: Any*): QValue

Attributes

Inherited from:
LiteralsSyntax
inline def scheme(inline args: Any*): Scheme

Attributes

Inherited from:
LiteralsSyntax
inline def uri(inline args: Any*): Uri

Attributes

Inherited from:
LiteralsSyntax

Implicits

Implicits

final implicit def AuthedRoutesCompanionOps(companion: AuthedRoutes.type): AuthedRoutesCompanionOps
final implicit def Request2AuthedRequest(request: Request[IO]): Request2AuthedRequest
implicit val key: Key[A]

Inherited implicits

final implicit def ClientFunFixtureTestOps(fixture: SyncIO[FunFixture[Client[IO]]]): ClientFunFixtureTestOps

Attributes

Inherited from:
Http4sSuite
final implicit def Http4sMUnitAuthedRequestTypeOps(t: AuthedRequest.type): Http4sMUnitAuthedRequestTypeOps

Attributes

Inherited from:
Http4sMUnitSyntax
final implicit def Http4sMUnitClientOps(client: Client[IO]): Http4sMUnitClientOps

Attributes

Inherited from:
Http4sMUnitSyntax
final implicit def Http4sMUnitClientTypeOps(t: Client.type): Http4sMUnitClientTypeOps

Attributes

Inherited from:
Http4sMUnitSyntax
final implicit def Http4sMUnitHttpAppOps[A](httpApp: HttpApp[IO]): Http4sMUnitHttpAppOps[A]

Attributes

Inherited from:
Http4sMUnitSyntax
final implicit def Http4sMUnitKleisliResponseOps[A](kleisli: Kleisli[[_] =>> OptionT[IO, _$3], A, Response[IO]]): Http4sMUnitKleisliResponseOps[A]

Attributes

Inherited from:
Http4sMUnitSyntax
final implicit def Http4sMUnitRequestOps(request: Request[IO]): Http4sMUnitRequestOps

Attributes

Inherited from:
Http4sMUnitSyntax

Attributes

Inherited from:
Http4sSuite
final implicit def Http4sMUnitUriOps(uri: Uri): Http4sMUnitUriOps

Attributes

Inherited from:
Http4sMUnitSyntax
final implicit def Http4sMunitCIStringOps(ci: CIString): Http4sMunitCIStringOps

Attributes

Inherited from:
Http4sMUnitSyntax

Attributes

Inherited from:
CatsEffectAssertions
final implicit def MUnitCatsAssertionsForIOOps[A](io: IO[A]): MUnitCatsAssertionsForIOOps[A]

Attributes

Inherited from:
CatsEffectAssertions

Attributes

Inherited from:
CatsEffectAssertions
final implicit def MUnitCatsAssertionsForSyncIOOps[A](io: SyncIO[A]): MUnitCatsAssertionsForSyncIOOps[A]

Attributes

Inherited from:
CatsEffectAssertions

Attributes

Inherited from:
CatsEffectAssertions
final implicit def ResponseCluesOps(response: Response[IO]): ResponseCluesOps

Attributes

Inherited from:
Http4sSuite
final implicit def SyncIOFunFixtureOps[T](fixture: SyncIO[FunFixture[T]]): SyncIOFunFixtureOps[T]

Attributes

Inherited from:
CatsEffectFunFixtures
implicit def http4sAcceptedSyntax(status: Accepted.type): AcceptedOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sAlreadyReportedSyntax(status: AlreadyReported.type): AlreadyReportedOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sBadGatewaySyntax(status: BadGateway.type): BadGatewayOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sBadRequestSyntax(status: BadRequest.type): BadRequestOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sClientSyntaxMethod(method: Method): MethodOps[IO]

Attributes

Inherited from:
Http4sClientDsl
implicit def http4sConflictSyntax(status: Conflict.type): ConflictOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sContinueSyntax(status: Continue.type): ContinueOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sCreatedSyntax(status: Created.type): CreatedOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sEarlyHintsSyntax(status: EarlyHints.type): EarlyHintsOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sExpectationFailedSyntax(status: ExpectationFailed.type): ExpectationFailedOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sFailedDependencySyntax(status: FailedDependency.type): FailedDependencyOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sForbiddenSyntax(status: Forbidden.type): ForbiddenOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sFoundSyntax(status: Found.type): FoundOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sGatewayTimeoutSyntax(status: GatewayTimeout.type): GatewayTimeoutOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sGoneSyntax(status: Gone.type): GoneOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sHeaderSyntax[A](a: A)(implicit header: Header[A, _]): HeaderOps[A]

Attributes

Inherited from:
HeaderSyntax
implicit def http4sHeadersDecoder[T](implicit F: Applicative[IO], decoder: EntityDecoder[IO, T]): EntityDecoder[IO, (Headers, T)]

Attributes

Inherited from:
Http4sClientDsl
implicit def http4sHttpVersionNotSupportedSyntax(status: HttpVersionNotSupported.type): HttpVersionNotSupportedOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sIMUsedSyntax(status: IMUsed.type): IMUsedOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sInsufficientStorageSyntax(status: InsufficientStorage.type): InsufficientStorageOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sInternalServerErrorSyntax(status: InternalServerError.type): InternalServerErrorOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sKleisliAuthedRoutesSyntax[F[_], A](authedRoutes: AuthedRoutes[A, F]): KleisliAuthedRoutesOps[F, A]

Attributes

Inherited from:
KleisliSyntax
implicit def http4sKleisliHttpAppSyntax[F[_] : Functor](app: HttpApp[F]): KleisliHttpAppOps[F]

Attributes

Inherited from:
KleisliSyntax
implicit def http4sKleisliHttpRoutesSyntax[F[_]](routes: HttpRoutes[F]): KleisliHttpRoutesOps[F]

Attributes

Inherited from:
KleisliSyntax
implicit def http4sKleisliResponseSyntaxOptionT[F[_] : Functor, A](kleisli: Kleisli[[_] =>> OptionT[F, _$2], A, Response[F]]): KleisliResponseOps[F, A]

Attributes

Inherited from:
KleisliSyntax
implicit def http4sLengthRequiredSyntax(status: LengthRequired.type): LengthRequiredOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sLockedSyntax(status: Locked.type): LockedOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sLoopDetectedSyntax(status: LoopDetected.type): LoopDetectedOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sMethodConcatSyntax(methods: MethodConcat): MethodConcatOps

Attributes

Inherited from:
RequestDsl
implicit def http4sMethodNotAllowedSyntax(status: MethodNotAllowed.type): MethodNotAllowedOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sMethodSyntax(method: Method): MethodOps

Attributes

Inherited from:
RequestDsl
implicit def http4sMisdirectedRequestSyntax(status: MisdirectedRequest.type): MisdirectedRequestOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sMovedPermanentlySyntax(status: MovedPermanently.type): MovedPermanentlyOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sMultiStatusSyntax(status: MultiStatus.type): MultiStatusOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sMultipleChoicesSyntax(status: MultipleChoices.type): MultipleChoicesOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sNetworkAuthenticationRequiredSyntax(status: NetworkAuthenticationRequired.type): NetworkAuthenticationRequiredOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sNoContentSyntax(status: NoContent.type): NoContentOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sNonAuthoritativeInformationSyntax(status: NonAuthoritativeInformation.type): NonAuthoritativeInformationOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sNotAcceptableSyntax(status: NotAcceptable.type): NotAcceptableOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sNotExtendedSyntax(status: NotExtended.type): NotExtendedOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sNotFoundSyntax(status: NotFound.type): NotFoundOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sNotImplementedSyntax(status: NotImplemented.type): NotImplementedOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sNotModifiedSyntax(status: NotModified.type): NotModifiedOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sOkSyntax(status: Ok.type): OkOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sPartialContentSyntax(status: PartialContent.type): PartialContentOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sPayloadTooLargeSyntax(status: PayloadTooLarge.type): PayloadTooLargeOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sPaymentRequiredSyntax(status: PaymentRequired.type): PaymentRequiredOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sPermanentRedirectSyntax(status: PermanentRedirect.type): PermanentRedirectOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sPreconditionFailedSyntax(status: PreconditionFailed.type): PreconditionFailedOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sPreconditionRequiredSyntax(status: PreconditionRequired.type): PreconditionRequiredOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sProxyAuthenticationRequiredSyntax(status: ProxyAuthenticationRequired.type): ProxyAuthenticationRequiredOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sRangeNotSatisfiableSyntax(status: RangeNotSatisfiable.type): RangeNotSatisfiableOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sRequestHeaderFieldsTooLargeSyntax(status: RequestHeaderFieldsTooLarge.type): RequestHeaderFieldsTooLargeOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sRequestTimeoutSyntax(status: RequestTimeout.type): RequestTimeoutOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sResetContentSyntax(status: ResetContent.type): ResetContentOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sSeeOtherSyntax(status: SeeOther.type): SeeOtherOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sSelectSyntaxMultiple[A, H[_]](a: H[A])(implicit select: Aux[A, H]): SelectOpsMultiple[A, H]

Attributes

Inherited from:
HeaderSyntax
implicit def http4sSelectSyntaxOne[A](a: A)(implicit select: Select[A]): SelectOpsOne[A]

Attributes

Inherited from:
HeaderSyntax
implicit def http4sServiceUnavailableSyntax(status: ServiceUnavailable.type): ServiceUnavailableOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sSwitchingProtocolsSyntax(status: SwitchingProtocols.type): SwitchingProtocolsOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sTemporaryRedirectSyntax(status: TemporaryRedirect.type): TemporaryRedirectOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sTooEarlySyntax(status: TooEarly.type): TooEarlyOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sTooManyRequestsSyntax(status: TooManyRequests.type): TooManyRequestsOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sUnauthorizedSyntax(status: Unauthorized.type): UnauthorizedOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sUnavailableForLegalReasonsSyntax(status: UnavailableForLegalReasons.type): UnavailableForLegalReasonsOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sUnprocessableEntitySyntax(status: UnprocessableEntity.type): UnprocessableEntityOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sUnsupportedMediaTypeSyntax(status: UnsupportedMediaType.type): UnsupportedMediaTypeOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sUpgradeRequiredSyntax(status: UpgradeRequired.type): UpgradeRequiredOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sUriTooLongSyntax(status: UriTooLong.type): UriTooLongOps[IO, IO]

Attributes

Inherited from:
Responses
implicit def http4sVariantAlsoNegotiatesSyntax(status: VariantAlsoNegotiates.type): VariantAlsoNegotiatesOps[IO, IO]

Attributes

Inherited from:
Responses
implicit override def munitExecutionContext: ExecutionContext

Attributes

Definition Classes
CatsEffectSuite -> Suite
Inherited from:
CatsEffectSuite
implicit def munitIORuntime: IORuntime

Attributes

Inherited from:
CatsEffectSuite
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

Deprecated and Inherited implicits

implicit def http4sStringSyntax(s: String): StringOps

Attributes

Deprecated
true
Inherited from:
StringSyntax