PizzaClientSpec

smithy4s.tests.PizzaClientSpec
abstract class PizzaClientSpec extends MutableIOSuite

Attributes

Graph
Supertypes
class MutableIOSuite
trait Helpers
trait BaseIOSuite
trait BaseCatsSuite
trait Provider[IO]
class MutableFSuite[IO]
class RunnableSuite[IO]
trait EffectSuite[IO]
trait Here
trait Suite[IO]
trait BaseSuiteClass
class Object
trait Matchable
class Any
Show all

Members list

Type members

Classlikes

case class Backend(ref: Ref[IO, State])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class State(requests: Map[String, Chain[Request[IO]]], nextResponses: Map[String, Response[IO]])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object State

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
State.type

Inherited classlikes

class PartiallyAppliedTest(name: TestName)

Attributes

Inherited from:
MutableFSuite
Supertypes
class Object
trait Matchable
class Any
implicit class StringOps(str: String)

Attributes

Inherited from:
Helpers
Supertypes
class Object
trait Matchable
class Any

Types

Inherited types

final type EffectType[A] = F[A]

Attributes

Inherited from:
EffectSuite

Value members

Abstract methods

def server(app: HttpApp[IO]): Resource[IO, Int]

Concrete methods

def clientTest(name: TestName)(f: (PizzaAdminService[IO], Backend, Log[IO]) => IO[Expectations]): Unit
def clientTestForError[E](name: String, response: Response[IO], expected: E)(implicit loc: SourceLocation, ct: ClassTag[E], show: Show[E]): Unit
def retryResource[A](resource: Resource[IO, A], max: Int): Resource[IO, A]

Inherited methods

def assert: Expect

Attributes

Inherited from:
Helpers
def cancel(reason: String)(implicit pos: SourceLocation): F[Nothing]

Raise an error that leads to the running test being tagged as "cancelled".

Raise an error that leads to the running test being tagged as "cancelled".

Attributes

Inherited from:
EffectSuite
def exists[L[_], A](la: L[A])(f: A => Expectations)(implicit foldable: Foldable[L], pos: SourceLocation): Expectations

Checks that an assertion is true for at least one element in a foldable. Fails if the foldable is empty.

Checks that an assertion is true for at least one element in a foldable. Fails if the foldable is empty.

Attributes

Example
   val xs =
     List("foo", "bar")
   // success
   exists(xs)(s => expect.eql("foo", s)
Inherited from:
Helpers
def expect: Expect

Expect macros

Expect macros

Attributes

Inherited from:
Helpers
def fail[A](hint: String)(implicit pos: SourceLocation): A => Expectations

Attributes

Inherited from:
Helpers
def failure(hint: String)(implicit pos: SourceLocation): Expectations

Attributes

Inherited from:
Helpers
def forEach[L[_], A](la: L[A])(f: A => Expectations)(implicit L: Foldable[L]): Expectations

Checks that an assertion is true for all elements in a foldable. Succeeds if the foldable is empty.

Checks that an assertion is true for all elements in a foldable. Succeeds if the foldable is empty.

Attributes

Example
   val xs =
     List("foo", "bar")
   // success
   forEach(xs)(s => expect.eql(3, s.length)
Inherited from:
Helpers
def getSuite: EffectSuite[IO]

Attributes

Inherited from:
BaseIOSuite
inline def here: SourceLocation

Pulls source location without being affected by implicit scope.

Pulls source location without being affected by implicit scope.

Attributes

Inherited from:
Here
def ignore(reason: String)(implicit pos: SourceLocation): F[Nothing]

Raises an error that leads to the running test being tagged as "ignored"

Raises an error that leads to the running test being tagged as "ignored"

Attributes

Inherited from:
EffectSuite
def inEach[L[_], A](la: L[A])(f: A => Expectations)(implicit L: Foldable[L]): Expectations

Alias for forEach

Alias for forEach

Attributes

Inherited from:
Helpers
def isCI: Boolean

Attributes

Inherited from:
RunnableSuite
def loggedTest(name: TestName)(run: Log[IO] => IO[Expectations]): Unit

Attributes

Inherited from:
MutableFSuite
def matches[A](x: A)(f: PartialFunction[A, Expectations])(implicit pos: SourceLocation, A: Show[A]): Expectations

Checks that a given expression matches a certain pattern; fails otherwise.

Checks that a given expression matches a certain pattern; fails otherwise.

Attributes

Example
   matches(Option(4)) { case Some(x) =>
     expect.eql(4, x)
   }
Inherited from:
Helpers
def maxParallelism: Int

Attributes

Inherited from:
MutableFSuite
override def name: String

Attributes

Definition Classes
EffectSuite -> Suite
Inherited from:
EffectSuite
def not(assertion: Expectations)(implicit pos: SourceLocation): Expectations

Attributes

Inherited from:
Helpers
def plan: List[TestName]

Attributes

Inherited from:
MutableFSuite
def pureTest(name: TestName)(run: => Expectations): Unit

Attributes

Inherited from:
MutableFSuite
protected def registerTest(name: TestName)(f: Res => IO[TestOutcome]): Unit

Attributes

Inherited from:
MutableFSuite
final def run(args: List[String])(report: TestOutcome => IO[Unit]): F[Unit]

Attributes

Inherited from:
EffectSuite
override def spec(args: List[String]): Stream[F, TestOutcome]

Attributes

Definition Classes
MutableFSuite -> Suite
Inherited from:
MutableFSuite
def succeed[A]: A => Expectations

Attributes

Inherited from:
Helpers
def test(name: TestName): PartiallyAppliedTest

Attributes

Inherited from:
MutableFSuite
def verify(condition: Boolean)(implicit pos: SourceLocation): Expectations

Attributes

Inherited from:
Helpers
def verify(condition: Boolean, hint: String)(implicit pos: SourceLocation): Expectations

Attributes

Inherited from:
Helpers
def whenSuccess[F[_], A, E](fa: F[A])(f: A => Expectations)(implicit pos: SourceLocation, F: ApplicativeError[F, E], G: Foldable[F], E: Show[E]): Expectations

Checks that an ApplicativeError (like Either) is successful

Checks that an ApplicativeError (like Either) is successful

Attributes

Example
   val res: Either[String, Int] =
     Right(4)
   whenSuccess(res) { n =>
     expect.eql(4, n)
   }
Inherited from:
Helpers

Concrete fields

val randomInt: Resource[IO, Int]
val randomPort: Resource[IO, Int]

Inherited fields

val success: Expectations

Attributes

Inherited from:
Helpers

Implicits

Inherited implicits

final implicit def StringOps(str: String): StringOps

Attributes

Inherited from:
Helpers
implicit protected def effectCompat: UnsafeRun[IO]

Attributes

Inherited from:
BaseIOSuite