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)); } }
public void GetItemsUnprocessableExceptionTest() { Assert.Throws <UnprocessableException>(() => _directoryLogic.GetItems(null)); }