FakeCEPHost class

A scriptable DigiaCEPHost for plugin tests.

Mints deterministic presentation ids (p-1, p-2, …) so a scenario can name the presentation it means, and never throws from deliver — the same total-function contract core owes.

Implemented types

Constructors

FakeCEPHost()

Properties

allHoldsReleased → bool
Whether every presentation ever delivered has released its CEP hold.
no setter
allSettled → bool
Whether every presentation ever delivered has settled.
no setter
controllers → List<PresentationController>
The write faces, in delivery order — for scenarios the helpers below don't cover.
no setter
delivered → List<CampaignPresentation>
The read faces handed back to the plugin, in delivery order.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isReady ↔ bool
Whether core is READY, so deliver routes instead of dropping.
getter/setter pairoverride-getter
last → PresentationController
The most recent delivery. Throws if nothing has been delivered — a test asserting on a presentation that was never created has already failed.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
triggers → List<CEPTriggerPayload>
Every trigger delivered, in order.
no setter

Methods

deliver(CEPTriggerPayload trigger) → CampaignPresentation
Delivers a CEP trigger into the Digia engine.
override
emitClicked({int? index, String? elementId}) → void
Emits clicked on a presentation. Defaults to the most recent delivery.
emitDisplayed({int? index}) → void
Marks a presentation visible, emitting displayed. Defaults to the most recent delivery.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
releaseHold({int? index}) → void
Frees the CEP's hold while the experience keeps running — the non-blocking (PIP, floater) case. Defaults to the most recent delivery.
scriptOutcome(PresentationOutcome outcome) → void
Queues an outcome for the next deliver, applied synchronously before the handle is returned.
settle(PresentationOutcome outcome, {int? index}) → void
Settles a presentation. Defaults to the most recent delivery.
settleAllDetached() → void
Settles every live presentation the way core does when the owning plugin is unregistered (G6): one that never displayed drops, one on screen dismisses. Call this before plugin.detach(), which is the order core guarantees.
toString() → String
A string representation of this object.
inherited

Operators

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