add method
Registers cell under id. Chainable.
Registering the same id twice replaces the previous entry. The
previous cell is not disposed — the harness does not own the
cells' lifecycles.
Parameters:
id: The Registration Key. ASymbol(#counter,#auth) used both here and in every lookup (cell, valueCell, recordPulses, emitAndSettle). The same symbol is installed into the CellScope built by pump.cell: The Registered Cell. Any Cell. Held by reference.
Returns:
this, for chaining registrations in setUp.
Throws:
StateError if dispose has already been called.
Implementation
CellTestHarness add(Symbol id, Cell cell) {
if (_disposed) {
throw StateError('CellTestHarness: add called after dispose.');
}
_cells[id] = cell;
return this;
}