public void ModifyParagraph(Paragraph newParagraph) { if (!paragraphDataAccess.Exists(newParagraph.Id)) { throw new ArgumentException("The paragraph argument not exist in database." , "newParagraph.Id"); } paragraphDataAccess.Modify(newParagraph); }
public void ModifyParagraphFromDb_ExpectedParameters_Ok() { paragraphDataAccess.Add(paragraph); paragraph.OwnStyleClass = "other Style Class"; paragraphDataAccess.Modify(paragraph); Paragraph obtained = paragraphDataAccess.Get(paragraph.Id); Assert.AreEqual(paragraph, obtained); }