public void MessagesAreNotConsumedIfDuplicateInQueue()
        {
            Stub.On(this.controller).GetProperty("Messages").Will(Return.Value(new object[] { "hello", "test", "world" }));

            BeforeConsumeMessageEventArgs e = new BeforeConsumeMessageEventArgs(this, "test");

            Fire.On(this.controller).Event("BeforeConsumeMessage").With(this, e);

            Assert.IsTrue(e.Cancel);
        }
        public void MessagesAreConsumedIfNoMessageInQueue()
        {
            Stub.On(this.controller).GetProperty("Messages").Will(Return.Value(new object[] { }));

            BeforeConsumeMessageEventArgs e = new BeforeConsumeMessageEventArgs(this, "test");

            Fire.On(this.controller).Event("BeforeConsumeMessage").With(this, e);

            Assert.IsFalse(e.Cancel);
        }