public void ensure_suggest_can_remove_tag_from_name() { Tag tag = new Tag("test"); _suggest.AddTag(tag); _suggest.RemoveTag("test"); Assert.That(_suggest.Tags.Count, Is.EqualTo(0)); }
public void ensure_suggest_can_add_tag() { Tag actual = new Tag("test"); _suggest.AddTag(actual); Assert.That(_suggest.Tags.Count, Is.EqualTo(1)); Assert.That(_suggest.Tags.FirstOrDefault(), Is.EqualTo(actual)); }
public void AddTag(Tag tag) { if (!Tags.Contains(tag)) { Tags.Add(tag); } }
public IEnumerable<Post> FindByTag(Tag tag) { return posts.Where(t => t.Tags.Contains(tag)); }
public void Tag_should_be_equal_if_the_name_is_equal() { Tag tagSource = new Tag("test"); Tag tagTarget = new Tag("test"); Assert.That(tagTarget, Is.EqualTo(tagTarget)); }
public void RemoveTag(Tag tag) { if (Tags.Contains(tag)) { Tags.Remove(tag); } }
public void AddTag(string tag) { Tag newTag = new Tag(tag); AddTag(newTag); }