コード例 #1
0
        public void CreationWithTopicAndMatcherTypes()
        {
            EventPublicationAttribute testee = new EventPublicationAttribute(Topic, typeof(int), typeof(string));

            Assert.AreEqual(Topic, testee.Topic);
            Assert.AreEqual(2, new List<Type>(testee.MatcherTypes).Count);
            Assert.AreEqual(HandlerRestriction.None, testee.HandlerRestriction);
        }
コード例 #2
0
        public void CreationWithTopicAndHandlerRestriction()
        {
            EventPublicationAttribute testee = new EventPublicationAttribute(Topic, HandlerRestriction.Synchronous);

            Assert.AreEqual(Topic, testee.Topic);
            Assert.AreEqual(0, new List<Type>(testee.MatcherTypes).Count);
            Assert.AreEqual(HandlerRestriction.Synchronous, testee.HandlerRestriction);
        }