override<T> method

void override<T>(
  1. T mockInstance
)

Injects an override for type T with mockInstance into this isolated test scope.

Example

scope.override<PaymentGateway>(FakePaymentGateway());

Implementation

void override<T>(T mockInstance) {
  container.override<T>(mockInstance);
}