public void SetUp() { _model = new CreateTabModel { Waiter = Waiter, TableNumber = TableNumber }; _sendEndpoint = Substitute.For <ISendEndpoint>(); _sendEndpointProvider = Substitute.For <ISendEndpointProvider>(); _sendEndpointProvider.GetSendEndpoint(Arg.Is <string>(queueName => queueName == CommandServiceQueueName)).Returns(Task.FromResult(_sendEndpoint)); _commandSendConfiguration = Substitute.For <ICommandSendConfiguration>(); _commandSendConfiguration.QueueName.Returns(CommandServiceQueueName); _commandSender = new CommandSender(_sendEndpointProvider, _commandSendConfiguration); }
public CommandSender(ISendEndpointProvider sendEndpointProvider, ICommandSendConfiguration commandSendConfiguration) { _sendEndpointProvider = sendEndpointProvider; _commandSendConfiguration = commandSendConfiguration; }