Code example for HttpUriRequest

Methods: getMethod

0
	public void testSendLocationSendsPutRequest() { 
		setUpLocationsResponse(); 
		gameEngine.sendLocation(currentLocation);
 
		HttpUriRequest request = httpClient.getRequest();
		assertEquals("PUT", request.getMethod());
	} 
 
	public void testGetLocationsRequestProperlySent() { 
		setUpLocationsResponse(); 
		gameEngine.getLocations();
		 
		HttpGet request = (HttpGet) httpClient.getRequest();
		 
		assertEquals("GET", request.getMethod());
		assertEquals("http://10.0.2.2:3000/locations", request.getURI().toString());
	} 
	 
	public void testSendLocationRequestContainsCurrentLocation() throws Exception { 
		setUpLocationsResponse(); 
Experience pair programming with AI  Get Codota for Java