//[TestCase(1, "Funny", false)] //[TestCase(null, "Funny", false)] //[TestCase(1, "", false)] //[TestCase(100, "Scum bucket", false)] //[TestCase(1, "Funny", false)] public void CanEditTags(int tagId, string tagName, bool success) { Tags tag = new Tags() { TagId = tagId, TagName = tagName }; TResponse <Tags> tags = manager.EditTag(tag); Assert.AreEqual(tags.Success, success); // Cannot be the same?? }
public ActionResult EditTag(Tags tag) { _tagsManager = TagsManagerFactory.Create(); var response = _tagsManager.EditTag(tag); if (response.Success == true) { return(RedirectToAction("Tags")); } else { return(RedirectToAction("Tags")); } }