TestCase<T> class

Most fundamental testing unit

create a TestCase by:

  • describing the test inside description
  • assembling ("building") the unit inside assemblers functions
  • acting on the assembled unit through actors functions
  • match ("assert") testable properties inside matchers functions

var testCases = [
  TestCase<CounterUnit>(
    "should increment value",
    [],
    [],
    [],
  )

]

Constructors

TestCase({required String description, required T assembler(), required List<T Function(T)> actors, required List<dynamic Function(T)> matchers})
const

Properties

actors List<T Function(T)>
list of functions that act upon the unit and return the unit afterwards
final
assembler → T Function()
should be a function that builds the unit to be tested and returns it
final
description String
description for the testcase to be shown inside test outputs
final
hashCode int
The hash code for this object.
no setterinherited
matchers List<dynamic Function(T)>
assertions the acted upon unit has to tested against
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited