public void DeleteDocumentFromDb_ExpectedParameters_Ok() { documentDataAccess.Add(document); documentDataAccess.Delete(document.Id); Document obtained = documentDataAccess.Get(document.Id); Assert.IsNull(obtained); }
public void DeleteDocument(Guid aDocumentId) { if (!documentDataAccess.Exists(aDocumentId)) { throw new ArgumentException("The document argument not exist in database." , "aDocumentId"); } documentDataAccess.Delete(aDocumentId); }
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); } }