Code example for UrlEncodedFormEntity

Methods: getContent

0
		 
		assertEquals(parametersFrom(expectedEncodedParameters), parametersFrom(actualEncodedParameters));
	} 
 
	private String parametersFrom(UrlEncodedFormEntity encodedParameters) throws IOException {
		BufferedReader expectedParametersReader = new BufferedReader(new InputStreamReader(encodedParameters.getContent()));
		String parameters = expectedParametersReader.readLine();
		encodedParameters.getContent().close();
		return parameters;
	} 
	 
	private void setUpLocationsResponse() { 
		httpClient = new MockHttpClient(new MockHttpResponse("[]"));
		gameEngine = new GameEngine(httpClient, DEVICE_ID);
	} 
	 
	private void setUpAuthenticationResponse() { 
		String playerJson = "{\"player\":{\"created_at\":\"2010-12-12T08:47:17Z\",\"device_id\":\"000000000000000451\",\"id\":66,\"updated_at\":\"2010-12-12T08:47:17Z\"}}";
		httpClient = new MockHttpClient(new MockHttpResponse(playerJson));
		gameEngine = new GameEngine(httpClient, DEVICE_ID);
	}