public EventsPublisherFixture() { ServiceBusSender = new FakeServiceBusSender(); ServiceBusClient = new FakeServiceBusClient(ServiceBusSender); _preSendingSteps = new List <IMessagePreSendingStep>(); MessageSerializer = Mock.Of <IMessageSerializer>(); Logger = Mock.Of <ILogger <EventsPublisher> >(); EventBusClient = Mock.Of <IEventBusClient>(); Mock.Get(EventBusClient) .Setup(s => s.Client) .Returns(ServiceBusClient); Publisher = new EventsPublisher(EventBusClient, MessageSerializer, Logger, PreSendingSteps); }
public FakeServiceBusClient(FakeServiceBusSender sender) { Sender = sender; Processor = default !;