コード例 #1
0
        public void DeleteDocumentFromDb_ExpectedParameters_Ok()
        {
            documentDataAccess.Add(document);

            documentDataAccess.Delete(document.Id);

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

            Assert.IsNull(obtained);
        }
コード例 #2
0
        public void DeleteDocument(Guid aDocumentId)
        {
            if (!documentDataAccess.Exists(aDocumentId))
            {
                throw new ArgumentException("The document argument not exist in database."
                                            , "aDocumentId");
            }

            documentDataAccess.Delete(aDocumentId);
        }
コード例 #3
0
        public static void Delete(Guid id, int userId)
        {
            // delete the mindmap
            DataAccess.Delete(id);
            // delete json file
            var path = GetFilePath(id);

            if (File.Exists(path))
            {
                File.Delete(path);
            }
        }