Ejemplo n.º 1
0
        public void PublishForSubscribe()
        {
            var producer = RabbitMQTestHelper.GetProducer("hello.subscribe", true);

            producer.Publish("hello:" + DateTime.Now.ToString());

            Assert.True(true);
        }
Ejemplo n.º 2
0
        public void PublishMail()
        {
            var producer = RabbitMQTestHelper.GetProducer("send.email");

            //for (int i = 0; i < 5; i++)
            producer.Publish("{'subject':'测试邮件','body':'邮件内容" + DateTime.Now.ToString() + "','address':'*****@*****.**'}");

            Assert.True(true);
        }
Ejemplo n.º 3
0
        public void Receive()
        {
            var channel = RabbitMQTestHelper.GetConsumer("hello");

            channel.Received += Channel_Received;
            channel.Begin(false);
            Thread.Sleep(300 * 10);
            Assert.True(true);
        }
Ejemplo n.º 4
0
        public void Publish()
        {
            var producer = RabbitMQTestHelper.GetProducer("hello");

            for (int i = 0; i < 100; i++)
            {
                producer.Publish("hello:" + i.ToString());
            }

            Assert.True(true);
        }