public void ShouldDeleteUserComic() { var countBefore = _userComics.Count; _service.Delete(12767, UserId); Assert.AreEqual(countBefore - 1, _userComics.Count); }
public IHttpActionResult Follow(int id) { if (_userComicService.IsFollowing(id, UserId)) { _userComicService.Delete(id, UserId); } else { var seriesId = _comicService.GetSeriesIdForComicId(id); if (!_userSeries.IsFollowing(seriesId, UserId)) { _userSeries.Add(seriesId, UserId); } _userComicService.Add(id, UserId); } return(Ok()); }