public void GetAll() { var products = _productLibrary.GetAll(); var countShouldBe = _products.Count; var countIs = products.Count; Assert.AreEqual(countShouldBe, countIs); }
public IHttpActionResult GetAll() { try { var result = _productLibrary.GetAll(); return(Ok(result)); } catch (Exception ex) { return(BadRequest(ex.Message + ex.InnerException?.Message + ex.InnerException?.StackTrace)); } }