public void Search_for_parent_tag_returns_tag_and_children() { var entityUnderTest = new DreamTagSearch(GetDreamTags()); var result = entityUnderTest.SearchForTags("Friend").ToList(); result.Should().HaveCount(3); result.All(x => x.Tag == "Friend" || x.ParentTag == "Friend").Should().BeTrue(); }
public void Search_for_child_tag_returns_tag_and_parent() { var entityUnderTest = new DreamTagSearch(GetDreamTags()); var result = entityUnderTest.SearchForTags("Everest").ToList(); result.Should().HaveCount(2); result.All(x => x.Tag == "Mountain" || x.ParentTag == "Mountain").Should().BeTrue(); }
public void Search_for_whitespace_string_returns_all_entries() { var entityUnderTest = new DreamTagSearch(GetDreamTags()); entityUnderTest.SearchForTags(" ").Should().HaveCount(7); }