Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }