public PartialViewResult GCD(string a, string b)
 {
     try
     {
         var result = _basicAlgorithms.GCD(Convert.ToInt64(a), Convert.ToInt64(b));
         return(PartialView(
                    "_Results",
                    new ResultsViewModel
         {
             Success = true,
             Result = result.ToString()
         }));
     }
     catch (Exception)
     {
         return(PartialView("_Results", new ResultsViewModel {
             Success = false
         }));
     }
 }
Beispiel #2
0
        public void GCD_AIsZero_ReturnsB()
        {
            var result = _basicAlgorithms.GCD(0, 10);

            Assert.AreEqual(10, result);
        }