Esempio n. 1
0
        public void when_ack_null_message()
        {
            var queue1 = InitQueue("test1");

            var inbox = new FileQueueReader(new[] { queue1 }, x => new TimeSpan(x));

            inbox.InitIfNeeded();
            inbox.AckMessage(null);
        }
Esempio n. 2
0
        public void when_ack_messages_by_name()
        {
            var queue1 = InitQueue("test1");

            var inbox = new FileQueueReader(new[] { queue1 }, x => new TimeSpan(x));

            inbox.InitIfNeeded();
            MessageTransportContext message1;

            inbox.TakeMessage(new CancellationToken(false), out message1);
            inbox.AckMessage(message1);

            Assert.IsFalse(new FileInfo(((FileInfo)message1.TransportMessage).FullName).Exists);
        }