@@ -147,8 +147,7 @@ public void testResponseTimesArePopulatedCorrectly() throws Exception {
147147 public void testTorontoToMontreal () throws Exception {
148148 try (LocalTestServerContext sc =
149149 new LocalTestServerContext ("{\" routes\" : [{}],\" status\" : \" OK\" }" )) {
150- DirectionsResult result =
151- DirectionsApi .newRequest (sc .context ).origin ("Toronto" ).destination ("Montreal" ).await ();
150+ DirectionsApi .newRequest (sc .context ).origin ("Toronto" ).destination ("Montreal" ).await ();
152151
153152 sc .assertParamValue ("Toronto" , "origin" );
154153 sc .assertParamValue ("Montreal" , "destination" );
@@ -165,13 +164,12 @@ public void testTorontoToMontreal() throws Exception {
165164 public void testTorontoToMontrealByBicycleAvoidingHighways () throws Exception {
166165 try (LocalTestServerContext sc =
167166 new LocalTestServerContext ("{\" routes\" : [{}],\" status\" : \" OK\" }" )) {
168- DirectionsResult result =
169- DirectionsApi .newRequest (sc .context )
170- .origin ("Toronto" )
171- .destination ("Montreal" )
172- .avoid (DirectionsApi .RouteRestriction .HIGHWAYS )
173- .mode (TravelMode .BICYCLING )
174- .await ();
167+ DirectionsApi .newRequest (sc .context )
168+ .origin ("Toronto" )
169+ .destination ("Montreal" )
170+ .avoid (DirectionsApi .RouteRestriction .HIGHWAYS )
171+ .mode (TravelMode .BICYCLING )
172+ .await ();
175173
176174 sc .assertParamValue ("Toronto" , "origin" );
177175 sc .assertParamValue ("Montreal" , "destination" );
@@ -190,12 +188,11 @@ public void testTorontoToMontrealByBicycleAvoidingHighways() throws Exception {
190188 public void testBrooklynToQueensByTransit () throws Exception {
191189 try (LocalTestServerContext sc =
192190 new LocalTestServerContext ("{\" routes\" : [{}],\" status\" : \" OK\" }" )) {
193- DirectionsResult result =
194- DirectionsApi .newRequest (sc .context )
195- .origin ("Brooklyn" )
196- .destination ("Queens" )
197- .mode (TravelMode .TRANSIT )
198- .await ();
191+ DirectionsApi .newRequest (sc .context )
192+ .origin ("Brooklyn" )
193+ .destination ("Queens" )
194+ .mode (TravelMode .TRANSIT )
195+ .await ();
199196
200197 sc .assertParamValue ("Brooklyn" , "origin" );
201198 sc .assertParamValue ("Queens" , "destination" );
@@ -213,12 +210,11 @@ public void testBrooklynToQueensByTransit() throws Exception {
213210 public void testBostonToConcordViaCharlestownAndLexignton () throws Exception {
214211 try (LocalTestServerContext sc =
215212 new LocalTestServerContext ("{\" routes\" : [{}],\" status\" : \" OK\" }" )) {
216- DirectionsResult result =
217- DirectionsApi .newRequest (sc .context )
218- .origin ("Boston,MA" )
219- .destination ("Concord,MA" )
220- .waypoints ("Charlestown,MA" , "Lexington,MA" )
221- .await ();
213+ DirectionsApi .newRequest (sc .context )
214+ .origin ("Boston,MA" )
215+ .destination ("Concord,MA" )
216+ .waypoints ("Charlestown,MA" , "Lexington,MA" )
217+ .await ();
222218
223219 sc .assertParamValue ("Boston,MA" , "origin" );
224220 sc .assertParamValue ("Concord,MA" , "destination" );
@@ -237,12 +233,11 @@ public void testBostonToConcordViaCharlestownAndLexignton() throws Exception {
237233 public void testBostonToConcordViaCharlestownAndLexigntonLatLng () throws Exception {
238234 try (LocalTestServerContext sc =
239235 new LocalTestServerContext ("{\" routes\" : [{}],\" status\" : \" OK\" }" )) {
240- DirectionsResult result =
241- DirectionsApi .newRequest (sc .context )
242- .origin ("Boston,MA" )
243- .destination ("Concord,MA" )
244- .waypoints (new LatLng (42.379322 , -71.063384 ), new LatLng (42.444303 , -71.229087 ))
245- .await ();
236+ DirectionsApi .newRequest (sc .context )
237+ .origin ("Boston,MA" )
238+ .destination ("Concord,MA" )
239+ .waypoints (new LatLng (42.379322 , -71.063384 ), new LatLng (42.444303 , -71.229087 ))
240+ .await ();
246241
247242 sc .assertParamValue ("Boston,MA" , "origin" );
248243 sc .assertParamValue ("Concord,MA" , "destination" );
@@ -260,12 +255,11 @@ public void testBostonToConcordViaCharlestownAndLexigntonLatLng() throws Excepti
260255 public void testToledoToMadridInSpain () throws Exception {
261256 try (LocalTestServerContext sc =
262257 new LocalTestServerContext ("{\" routes\" : [{}],\" status\" : \" OK\" }" )) {
263- DirectionsResult result =
264- DirectionsApi .newRequest (sc .context )
265- .origin ("Toledo" )
266- .destination ("Madrid" )
267- .region ("es" )
268- .await ();
258+ DirectionsApi .newRequest (sc .context )
259+ .origin ("Toledo" )
260+ .destination ("Madrid" )
261+ .region ("es" )
262+ .await ();
269263
270264 sc .assertParamValue ("Toledo" , "origin" );
271265 sc .assertParamValue ("Madrid" , "destination" );
@@ -278,13 +272,12 @@ public void testToledoToMadridInSpain() throws Exception {
278272 public void testLanguageParameter () throws Exception {
279273 try (LocalTestServerContext sc =
280274 new LocalTestServerContext ("{\" routes\" : [{}],\" status\" : \" OK\" }" )) {
281- DirectionsResult result =
282- DirectionsApi .newRequest (sc .context )
283- .origin ("Toledo" )
284- .destination ("Madrid" )
285- .region ("es" )
286- .language ("es" )
287- .await ();
275+ DirectionsApi .newRequest (sc .context )
276+ .origin ("Toledo" )
277+ .destination ("Madrid" )
278+ .region ("es" )
279+ .language ("es" )
280+ .await ();
288281
289282 sc .assertParamValue ("Toledo" , "origin" );
290283 sc .assertParamValue ("Madrid" , "destination" );
@@ -298,14 +291,13 @@ public void testLanguageParameter() throws Exception {
298291 public void testTrafficModel () throws Exception {
299292 try (LocalTestServerContext sc =
300293 new LocalTestServerContext ("{\" routes\" : [{}],\" status\" : \" OK\" }" ); ) {
301- DirectionsResult result =
302- DirectionsApi .newRequest (sc .context )
303- .origin ("48 Pirrama Road, Pyrmont NSW 2009" )
304- .destination ("182 Church St, Parramatta NSW 2150" )
305- .mode (TravelMode .DRIVING )
306- .departureTime (new DateTime ().plus (Duration .standardMinutes (2 )))
307- .trafficModel (TrafficModel .PESSIMISTIC )
308- .await ();
294+ DirectionsApi .newRequest (sc .context )
295+ .origin ("48 Pirrama Road, Pyrmont NSW 2009" )
296+ .destination ("182 Church St, Parramatta NSW 2150" )
297+ .mode (TravelMode .DRIVING )
298+ .departureTime (new DateTime ().plus (Duration .standardMinutes (2 )))
299+ .trafficModel (TrafficModel .PESSIMISTIC )
300+ .await ();
309301
310302 sc .assertParamValue ("48 Pirrama Road, Pyrmont NSW 2009" , "origin" );
311303 sc .assertParamValue ("182 Church St, Parramatta NSW 2150" , "destination" );
@@ -336,14 +328,13 @@ public void testTransitWithoutSpecifyingTime() throws Exception {
336328 public void testTransitParams () throws Exception {
337329 try (LocalTestServerContext sc =
338330 new LocalTestServerContext ("{\" routes\" : [{}],\" status\" : \" OK\" }" )) {
339- DirectionsResult result =
340- DirectionsApi .newRequest (sc .context )
341- .origin ("Fisherman's Wharf, San Francisco" )
342- .destination ("Union Square, San Francisco" )
343- .mode (TravelMode .TRANSIT )
344- .transitMode (TransitMode .BUS , TransitMode .TRAM )
345- .transitRoutingPreference (TransitRoutingPreference .LESS_WALKING )
346- .await ();
331+ DirectionsApi .newRequest (sc .context )
332+ .origin ("Fisherman's Wharf, San Francisco" )
333+ .destination ("Union Square, San Francisco" )
334+ .mode (TravelMode .TRANSIT )
335+ .transitMode (TransitMode .BUS , TransitMode .TRAM )
336+ .transitRoutingPreference (TransitRoutingPreference .LESS_WALKING )
337+ .await ();
347338
348339 sc .assertParamValue ("Fisherman's Wharf, San Francisco" , "origin" );
349340 sc .assertParamValue ("Union Square, San Francisco" , "destination" );
0 commit comments