예제 #1
0
        public void CanGetCurrencies()
        {
            const int expectedCount = 29;

            var currencies = _useCase.Execute();

            Assert.Equal(expectedCount, currencies.Count);
        }
예제 #2
0
 public JsonResult GetCurrencies()
 {
     try
     {
         var useCase = new GetCurrencies(_repository);
         return(Json(useCase.Execute()));
     }
     catch (Exception ex)
     {
         // TODO: Log.Error("api/Swea/GetCurrencies", ex);
         throw new ExchangeCalculatorException("Error getting currencies.");
     }
 }