public void BeforeEach()
        {
            subject = new RouteAdapter();

            AddressLocation origin = new AddressLocation()
            {
                address = new Address(){
                    street = "Avenida Jabaquara",
                    houseNumber = "100"
                },
                point = new MapLinkConnector.MaplinkV3_AddressFinder.Point(){
                    x = -46.6405497,
                    y = -23.6267322
                }
            };
            AddressLocation destination = new AddressLocation()
            {
                address = new Address(){
                    street = "Avenida Jabaquara",
                    houseNumber = "1000"
                },
                point = new MapLinkConnector.MaplinkV3_AddressFinder.Point()
                {
                    x = -46.6374321,
                    y = -23.6146506
                }
            };

            locations = new List<AddressLocation>();
            locations.Add(origin);
            locations.Add(destination);
        }
        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);
        }