Example #1
0
        public void GetAll()
        {
            var products      = _productLibrary.GetAll();
            var countShouldBe = _products.Count;
            var countIs       = products.Count;

            Assert.AreEqual(countShouldBe, countIs);
        }
Example #2
0
 public IHttpActionResult GetAll()
 {
     try
     {
         var result = _productLibrary.GetAll();
         return(Ok(result));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message + ex.InnerException?.Message + ex.InnerException?.StackTrace));
     }
 }