public void GetTopicByName() { // Arrange var topicName = "Publishing.TopicTests.GetTopicByName"; _publisher.AddOrUpdateTopic(new Topic { Name = topicName + "!" }); // Add look-a-likes _publisher.AddOrUpdateTopic(new Topic { Name = "!" + topicName }); var topicToBeFound = _publisher.AddOrUpdateTopic(new Topic { Name = topicName }); // Act var topic = _publisher.GetTopicByName(topicName); // Assert Assert.NotNull(topic); Assert.Equal(topicToBeFound.Id.Value, topic.Id.Value); Assert.Equal(topicToBeFound.Name, topic.Name); Assert.Equal(topicToBeFound.Notes, topic.Notes); }