Code example for BasicHttpEntity

Methods: setContent

0
public class AgatteParserTest extends AndroidTestCase {
 
    public void testParseResponse() throws Exception { 
        AgatteParser instance  = AgatteParser.getInstance();
        HttpResponse test = new BasicHttpResponse(new ProtocolVersion("HTTP", 1, 1), 20, "OK");
        BasicHttpEntity test_entity = new BasicHttpEntity();
        test_entity.setContent(new ByteArrayInputStream(response_test1.getBytes()));
        test.setEntity(test_entity);
 
        Iterator<String> actual = instance.parse_query_response(test).iterator();
        assertTrue(actual.hasNext());
        assertEquals("12:10", actual.next());
        assertTrue(actual.hasNext());
        assertEquals("13:00", actual.next());
        assertFalse(actual.hasNext());
 
    } 
 
    public void testParseResponse2() throws Exception { 
        AgatteParser instance = AgatteParser.getInstance();
Experience pair programming with AI  Get Codota for Java