Esempio n. 1
0
        public void AddDocumentToDb_ExpectedParameters_Ok()
        {
            documentDataAccess.Add(document);

            Document obtained = documentDataAccess.Get(document.Id);

            Assert.AreEqual(document, obtained);
        }
        public void AddDocument(Document newDocument)
        {
            if (documentDataAccess.Exists(newDocument.Id))
            {
                throw new DuplicateWaitObjectException("newDocument.Id"
                                                       , "The Document you want to enter already exists in the database.");
            }

            documentDataAccess.Add(newDocument);
        }