public void CanGetTagTypeNoReferences() { TagTypeRepository repo = new TagTypeRepository(); TagType tagType = new TagType { Description = "tag type" }; repo.Add(tagType); Assert.AreEqual(tagType, repo.GetById(tagType.Id)); }
public void CanDeleteTagType() { TagTypeRepository repo = new TagTypeRepository(); TagType tagType = new TagType { Description = "tag type" }; repo.Add(tagType); repo.Delete(tagType.Id); Assert.Null(repo.GetById(tagType.Id)); }
public void CanUpdateTagType() { TagTypeRepository repo = new TagTypeRepository(); TagType tagType = new TagType { Description = "tag type" }; repo.Add(tagType); const string newDescription = "newDescription"; tagType.Description = newDescription; repo.Update(tagType); Assert.AreEqual(newDescription, repo.GetById(tagType.Id).Description); }