public async Task <JsonResult> GetTotalSum(string json) { try { ParseJson(JObject.Parse(json), out List <DateTime> conversionDates, out List <string> fromCurrencies, out List <decimal> originalAmounts, out string toCurrency); var useCase = new GetTotalSum(_repository); return(Json(await useCase.ExecuteAsync(conversionDates, fromCurrencies, originalAmounts, toCurrency))); } catch (Exception ex) { // TODO: Log.Error("api/Swea/GetConversion", ex); throw new ExchangeCalculatorException($"Error getting total sum from {json}."); } }
public GetTotalSumTests() { _useCase = new GetTotalSum(new SweaMockRepository()); }