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); }
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); }