public void TestFixtureSetUp() { redisManager = new BasicRedisClientManager(); mqService = new RedisMqServer(redisManager, 2, null); redisManager.Exec(r => r.FlushAll()); using (var mqPublisher = mqService.MessageFactory.CreateMessageProducer()) { var i = 0; mqPublisher.Publish(new MessageType1 { Name = "msg-" + i++ }); mqPublisher.Publish(new MessageType2 { Name = "msg-" + i++ }); mqPublisher.Publish(new MessageType2 { Name = "msg-" + i++ }); mqPublisher.Publish(new MessageType3 { Name = "msg-" + i++ }); mqPublisher.Publish(new MessageType3 { Name = "msg-" + i++ }); mqPublisher.Publish(new MessageType3 { Name = "msg-" + i++ }); } }
public void OnBeforeEachTest() { if (redisManager != null) { redisManager.Dispose(); } redisManager = new BasicRedisClientManager(TestConfig.SingleHost); redisManager.Exec(r => r.FlushAll()); }
public void OnBeforeEachTest() { if (redisManager != null) { redisManager.Dispose(); } redisManager = TestConfig.BasicClientManger; redisManager.Exec(r => r.FlushAll()); }
public void Can_Exec_Action() { redisManager.Exec(r => { r.Increment("key", 1); Assert.That(r.Get <int>("key"), Is.EqualTo(1)); }); }
public void TestFixtureSetUp() { redisManager = new BasicRedisClientManager(); mqService = new RedisMqServer(redisManager, 2, null); redisManager.Exec(r => r.FlushAll()); using (var mqPublisher = mqService.MessageFactory.CreateMessageProducer()) { var i=0; mqPublisher.Publish(new MessageType1 { Name = "msg-" + i++ }); mqPublisher.Publish(new MessageType2 { Name = "msg-" + i++ }); mqPublisher.Publish(new MessageType2 { Name = "msg-" + i++ }); mqPublisher.Publish(new MessageType3 { Name = "msg-" + i++ }); mqPublisher.Publish(new MessageType3 { Name = "msg-" + i++ }); mqPublisher.Publish(new MessageType3 { Name = "msg-" + i++ }); } }
public void TestSetUp() { if (redisManager != null) redisManager.Dispose(); redisManager = new BasicRedisClientManager(TestConfig.SingleHost); redisManager.Exec(r => r.FlushAll()); }
public void TestSetUp() { if (redisManager != null) redisManager.Dispose(); redisManager = TestConfig.BasicClientManger; redisManager.Exec(r => r.FlushAll()); }
public void OnBeforeEachTest() { if (redisManager != null) redisManager.Dispose(); redisManager = TestConfig.BasicClientManger; redisManager.Exec(r => r.FlushAll()); }