MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / getCharsetSupplied

Method getCharsetSupplied

test/tsd/TestHttpQuery.java:440–448  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

438 }
439
440 @Test
441 public void getCharsetSupplied() {
442 final Channel channelMock = NettyMocks.fakeChannel();
443 final HttpRequest req = new DefaultHttpRequest(HttpVersion.HTTP_1_1,
444 HttpMethod.GET, "/");
445 req.headers().add("Content-Type", "text/plain; charset=UTF-16");
446 final HttpQuery query = new HttpQuery(tsdb, req, channelMock);
447 assertEquals(Charset.forName("UTF-16"), query.getCharset());
448 }
449
450 @Test (expected = UnsupportedCharsetException.class)
451 public void getCharsetInvalid() {

Callers

nothing calls this directly

Calls 3

fakeChannelMethod · 0.95
getCharsetMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected