Table of Contents

Class IntegrationSpy

Namespace
Silverback.Testing
Assembly
Silverback.Integration.Testing.dll

Monitors and collects all outbound and inbound messages.

public class IntegrationSpy : IIntegrationSpy
Inheritance
IntegrationSpy
Implements
Inherited Members

Constructors

IntegrationSpy()

public IntegrationSpy()

Properties

InboundEnvelopes

Gets the list of IInboundEnvelope corresponding to all the inbound messages that have been processed by the consumer pipeline (except the ones that couldn't be deserialized, e.g. the ones with an empty body).

public IReadOnlyList<IInboundEnvelope> InboundEnvelopes { get; }

Property Value

IReadOnlyList<IInboundEnvelope>

OutboundEnvelopes

Gets the list of IOutboundEnvelope corresponding to all the outbound messages.

public IReadOnlyList<IOutboundEnvelope> OutboundEnvelopes { get; }

Property Value

IReadOnlyList<IOutboundEnvelope>

Remarks

The messages produced via RawProduce or RawProduceAsync will not go through the Silverback pipeline and will therefore not show up in this collection.

RawInboundEnvelopes

Gets the list of IRawInboundEnvelope corresponding to all the inbound messages, before they are even processed by the consumer pipeline.

public IReadOnlyList<IRawInboundEnvelope> RawInboundEnvelopes { get; }

Property Value

IReadOnlyList<IRawInboundEnvelope>

RawOutboundEnvelopes

Gets the list of IOutboundEnvelope corresponding to all the actual outbound messages being produced (these may differ from the OutboundEnvelopes, e.g. if chunking is applied).

public IReadOnlyList<IOutboundEnvelope> RawOutboundEnvelopes { get; }

Property Value

IReadOnlyList<IOutboundEnvelope>

Remarks

The messages produced via RawProduce or RawProduceAsync will not go through the Silverback pipeline and will therefore not show up in this collection.

Methods

AddInboundEnvelope(IInboundEnvelope)

Adds an item to the InboundEnvelopes.

public void AddInboundEnvelope(IInboundEnvelope envelope)

Parameters

envelope IInboundEnvelope

The IInboundEnvelope to add.

AddOutboundEnvelope(IOutboundEnvelope)

Adds an item to the OutboundEnvelopes.

public void AddOutboundEnvelope(IOutboundEnvelope envelope)

Parameters

envelope IOutboundEnvelope

The IOutboundEnvelope to add.

AddRawInboundEnvelope(IRawInboundEnvelope)

Adds an item to the Silverback.Messaging.Messages.RawInboundEnvelope.

public void AddRawInboundEnvelope(IRawInboundEnvelope envelope)

Parameters

envelope IRawInboundEnvelope

The IRawInboundEnvelope to add.

AddRawOutboundEnvelope(IOutboundEnvelope)

Adds an item to the RawOutboundEnvelopes.

public void AddRawOutboundEnvelope(IOutboundEnvelope envelope)

Parameters

envelope IOutboundEnvelope

The IOutboundEnvelope to add.