@Test public void testGetTravelModeTransit() { assertThat(this.logic.getTravelMode("transit"), equalTo(TravelMode.TRANSIT)); assertThat(this.logic.getTravelMode("public transport"), equalTo(TravelMode.TRANSIT)); assertThat(this.logic.getTravelMode("transport"), equalTo(TravelMode.TRANSIT)); }
public TravelMode getTravelMode(String mode) { switch (mode.toLowerCase()) { case "driving": case "car": return TravelMode.DRIVING; case "bicycling": case "bicycle": case "bike": return TravelMode.BICYCLING; case "transit": case "public transport": case "public transit": case "transport": return TravelMode.TRANSIT; case "walking": case "walk": return TravelMode.WALKING; default: return null; } }
DirectionApiLogic { public TravelMode getTravelMode(String mode) { switch (mode.toLowerCase()) { case "driving": case "car": return TravelMode.DRIVING; case "bicycling": case "bicycle": case "bike": return TravelMode.BICYCLING; case "transit": case "public transport": case "public transit": case "transport": return TravelMode.TRANSIT; case "walking": case "walk": return TravelMode.WALKING; default: return null; } } }
DirectionApiLogic { public TravelMode getTravelMode(String mode) { switch (mode.toLowerCase()) { case "driving": case "car": return TravelMode.DRIVING; case "bicycling": case "bicycle": case "bike": return TravelMode.BICYCLING; case "transit": case "public transport": case "public transit": case "transport": return TravelMode.TRANSIT; case "walking": case "walk": return TravelMode.WALKING; default: return null; } }  }
DirectionApiLogic { public TravelMode getTravelMode(String mode) { switch (mode.toLowerCase()) { case "driving": case "car": return TravelMode.DRIVING; case "bicycling": case "bicycle": case "bike": return TravelMode.BICYCLING; case "transit": case "public transport": case "public transit": case "transport": return TravelMode.TRANSIT; case "walking": case "walk": return TravelMode.WALKING; default: return null; } }  BestTransportResult fromTo(String origin, String destination, TravelMode mode); BestTransportResult fromToWithDeparture(String origin, String destination, TravelMode mode,
			ReadableInstant departureTime); ReadableInstant whenIHaveToGo(String origin, String destination, TravelMode mode, DateTime arrivalTime); BestTransportResult getBestTransportInTime(String origin, String destination,
			ReadableInstant departureTime); TravelMode getTravelMode(String mode); }
DirectionApiLogic { public TravelMode getTravelMode(String mode) { switch (mode.toLowerCase()) { case "driving": case "car": return TravelMode.DRIVING; case "bicycling": case "bicycle": case "bike": return TravelMode.BICYCLING; case "transit": case "public transport": case "public transit": case "transport": return TravelMode.TRANSIT; case "walking": case "walk": return TravelMode.WALKING; default: return null; } }  BestTransportResult fromTo(String origin, String destination, TravelMode mode); BestTransportResult fromToWithDeparture(String origin, String destination, TravelMode mode,
			ReadableInstant departureTime); ReadableInstant whenIHaveToGo(String origin, String destination, TravelMode mode, DateTime arrivalTime); BestTransportResult getBestTransportInTime(String origin, String destination,
			ReadableInstant departureTime); TravelMode getTravelMode(String mode);  }