Exemple #1
0
 public ActionResult <List <string> > GetItemsInFolder(string path)
 {
     try
     {
         return(_directoryLogic.GetItems(path));
     }
     catch (UnprocessableException)
     {
         return(StatusCode(StatusCodes.Status422UnprocessableEntity));
     }
     catch (Exception e)
     {
         _logLogic.Log(e);
         return(StatusCode(StatusCodes.Status500InternalServerError));
     }
 }
Exemple #2
0
 public void GetItemsUnprocessableExceptionTest()
 {
     Assert.Throws <UnprocessableException>(() => _directoryLogic.GetItems(null));
 }