public void CreateOrder() { ConfirmOrder confirmOrder = this.confirmOrder; this.bus = BusBuilder.CreateMessageBus(); var sub = new ConfirmOrderRPCSubscriber(bus, dataContext); var result = sub.Response(confirmOrder, new MessageContext() { GlobalRequestId = Guid.NewGuid() }).Result; Assert.IsNotNull(result); }
public ConfirmOrderRPCSubscriber(RawRabbit.IBusClient bus, OrderDataContext dataContext) { this.Bus = bus; this.dataContext = dataContext; }
public BusBuilder(IWebHost webHost, IBusClient bus) { _webHost = webHost; _bus = bus; }
public ConfirmOrderRPCSubscriber(RawRabbit.IBusClient bus) { this.Bus = bus; }
public BusBuilder UseRabbitMq() { _bus = _webHost.Services.GetService(typeof(RawRabbit.IBusClient)) as RawRabbit.IBusClient; return(new BusBuilder(_webHost, _bus)); }