Package feign

Examples of feign.Response$InputStreamBody


  @Test public void nullBodyDecodesToNull() throws Exception {
    DecoderBindings bindings = new DecoderBindings();
    ObjectGraph.create(bindings).inject(bindings);

    Response response = Response.create(204, "OK", Collections.<String, Collection<String>>emptyMap(), null);
    assertEquals(bindings.decoder.decode(response, String.class), null);
  }
View Full Code Here


    List<Zone> zones = new LinkedList<Zone>();
    zones.add(new Zone("DENOMINATOR.IO."));
    zones.add(new Zone("DENOMINATOR.IO.", "ABCD"));

    Response response =
        Response.create(200, "OK", Collections.<String, Collection<String>>emptyMap(), zonesJson, UTF_8);
    assertEquals(bindings.decoder.decode(response, new TypeToken<List<Zone>>() {
    }.getType()), zones);
  }
View Full Code Here

        mock.setValue("Test");

        String mockXml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><mockObject>" +
                "<value>Test</value></mockObject>";

        Response response =
                Response.create(200, "OK", Collections.<String, Collection<String>>emptyMap(), mockXml, UTF_8);

        assertEquals(bindings.decoder.decode(response, new TypeToken<MockObject>() {}.getType()), mock);
    }
View Full Code Here

      currentText.append(ch, start, length);
    }
  }

  @Test public void nullBodyDecodesToNull() throws Exception {
    Response response = Response.create(204, "OK", Collections.<String, Collection<String>>emptyMap(), null);
    assertEquals(decoder.decode(response, String.class), null);
  }
View Full Code Here

TOP

Related Classes of feign.Response$InputStreamBody

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.