MqQueueFactory CreateQueueFactory(string namePrefix = null) { var connProvider = new DefaultMqConnectionProvider(TestMqTools.Load()); return(new MqQueueFactory(new DefaultMqChannelProvider(connProvider)) { Prefix = namePrefix, AutoDelete = true }); }
MqExchangeFactory CreateExchangeFactory(string namePrefix = null) { var connProvider = new DefaultMqConnectionProvider(TestMqTools.Load()); var chProvider = new DefaultMqChannelProvider(connProvider); return(new MqExchangeFactory(MqExchangeType.Fanout, chProvider) { Prefix = namePrefix, AutoDelete = true }); }
public void ShouldFailIfExchangeNotExists() { //Arrange var exchangeName = Guid.NewGuid().ToString("N"); var connProvider = new DefaultMqConnectionProvider(TestMqTools.Load()); var chProvider = new DefaultMqChannelProvider(connProvider); var exchange = new MqExchange(exchangeName, chProvider); //Act var exists = exchange.IsExists(); //Assert Assert.False(exists); }
IMqPublisher CreateTestPublisher(IAppStatusService appStatusService = null) => new DefaultMqPublisher( new DefaultMqChannelProvider(new DefaultMqConnectionProvider(TestMqTools.Load())), null, appStatusService);