public void GetById_ShouldReturnProperAmountOfTags() { var data = new FakeGalleryData(); var tagsService = new TagsService(data); var newTag = new Tag(); var tagId = newTag.Id; tagsService.Add(newTag); var foundTags = tagsService.GetById(tagId); Assert.AreEqual(1, foundTags.Count()); }
public void Delete_ShouldReturnProperDeletedTagId() { var data = new FakeGalleryData(); var tagsService = new TagsService(data); var newTag = new Tag(); var tagId = newTag.Id; tagsService.Add(newTag); tagsService.DeleteTagById(tagId); var foundTags = tagsService.GetById(tagId); Assert.AreEqual(0, foundTags.Count()); }