public void IsMatch_WhenTopicIsNotNull_ReturnsTrueIfMatched(string pattern, string topic, bool expectedResult)
        {
            var topicPattern = new TopicPattern(pattern);

            Assert.AreEqual(expectedResult, topicPattern.IsMatch(new Topic(topic)));
        }
        public void ToString_ReturnsThePattern()
        {
            var topic = new TopicPattern("my.topic");

            Assert.AreEqual("my.topic", topic.ToString());
        }
        public void IsMatch_WhenTopicIsNull_Throws()
        {
            var topicPattern = new TopicPattern("topic");

            Assert.Throws<ArgumentNullException>(() => topicPattern.IsMatch(null));
        }
        public void Constructor_WhenPatternIsValid_SetsPatternProperty(string pattern)
        {
            var topicPattern = new TopicPattern(pattern);

            Assert.AreEqual(pattern, topicPattern.Pattern);
        }