public void GetDocumentById_Success() { DocumentDomain document = _documentManipulation.GetDocumentById(1, 1); Assert.AreEqual(1, document.DocumentId); Assert.AreEqual(1, document.FileTypeId); Assert.AreEqual(1, document.StorageTypeId); Assert.AreEqual("Test Document", document.Name); Assert.AreEqual("Test test test test", document.Description); Assert.AreEqual(100, document.FileSize); Assert.AreEqual("path", document.Path); Assert.AreEqual("location id test", document.LocationExternalId); }
public IActionResult Get(int id) { try { return(Ok(DocumentManipulation.GetDocumentById(id))); } catch (Exception ex) { Logger.LogError(ex.Message); throw new NSIException(ex.Message, DC.Exceptions.Enums.Level.Error, DC.Exceptions.Enums.ErrorType.InvalidParameter); } }