Пример #1
0
        public void AddParagraphToDb_ExpectedParameters_Ok()
        {
            paragraphDataAccess.Add(paragraph);

            Paragraph obtained = paragraphDataAccess.Get(paragraph.Id);

            Assert.AreEqual(paragraph, obtained);
        }
Пример #2
0
        public void AddParagraph(Paragraph newParagraph)
        {
            if (paragraphDataAccess.Exists(newParagraph.Id))
            {
                throw new DuplicateWaitObjectException("newParagraph.Id"
                                                       , "The Paragraph you want to enter already exists in the database.");
            }

            paragraphDataAccess.Add(newParagraph);
        }