RecordedEventList<E> class

Coleção de primeira classe para eventos capturados durante testes.

Object Calisthenics:

  • Encapsula List<E> (coleção de primeira classe — Regra 4)
  • Uma única variável de instância (Regra 8)
  • Sem getters/setters de mutação expostos (Regra 9)

Constructors

RecordedEventList(List<E> events)
const
RecordedEventList.empty()

Properties

first → E
no setter
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
no setter
isNotEmpty bool
no setter
last → E
no setter
length int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

any(bool predicate(E event)) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toList() List<E>
toString() String
A string representation of this object.
inherited
where(bool predicate(E event)) RecordedEventList<E>

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) → E