Пример #1
0
        public void Test_GetCrustById()
        {
            Crust  sut    = crustrepository.GetCrustById(3);
            string actual = sut.Name;

            Assert.Equal(actual, "Cheese");
        }
 public ActionResult <Crust> Get(int id)
 {
     try
     {
         return(Ok(repo.GetCrustById(id)));
     }
     catch (Exception ex)
     {
         return(NotFound($"The crust Id - {id} does not exist" + ex.Message));
     }
 }