public void GetTopicElementById_WithElement_ReturnsNotNull() { var list = new TopicElementList(); list.Topics.Add(new TopicElement { TopicId = 1 }); list.Topics.Add(new TopicElement { TopicId = 2 }); var topicFound = list.GetTopicElementById(1); Assert.AreEqual(1, topicFound.TopicId); }
public void GetTopicElementById_WithoutElement_ReturnsNull() { var list = new TopicElementList(); list.Topics.Add(new TopicElement { TopicId = 1 }); list.Topics.Add(new TopicElement { TopicId = 2 }); var topicFound = list.GetTopicElementById(4); Assert.IsNull(topicFound); }