private string CalculateRouteTotals(string addressesJson, int routeType) { AddressAdapter addressAdapter = new AddressAdapter(); var locations = addressAdapter.FindAdresses(addressesJson); if (!String.IsNullOrEmpty(addressAdapter.ErrorMessage)) { return addressAdapter.ErrorMessage; } RouteAdapter routeAdapter = new RouteAdapter(); var routes = routeAdapter.GenerateRoutes(locations); var totals = routeAdapter.Calculate(routes, routeType); if (!String.IsNullOrEmpty(routeAdapter.ErrorMessage)) { return routeAdapter.ErrorMessage; } return routeAdapter.RouteTotalsToJson(totals); }
public void BeforeEach() { subject = new AddressAdapter(); }