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());
 }
Ejemplo n.º 3
0
 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));
     });
 }
Ejemplo n.º 5
0
		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());
 }
Ejemplo n.º 7
0
 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());
		}
 public void TestSetUp()
 {
     if (redisManager != null) redisManager.Dispose();
     redisManager = TestConfig.BasicClientManger;
     redisManager.Exec(r => r.FlushAll());
 }