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

Method getCharsetInvalid

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

Source from the content-addressed store, hash-verified

448 }
449
450 @Test (expected = UnsupportedCharsetException.class)
451 public void getCharsetInvalid() {
452 final Channel channelMock = NettyMocks.fakeChannel();
453 final HttpRequest req = new DefaultHttpRequest(HttpVersion.HTTP_1_1,
454 HttpMethod.GET, "/");
455 req.headers().add("Content-Type", "text/plain; charset=foobar");
456 final HttpQuery query = new HttpQuery(tsdb, req, channelMock);
457 assertEquals(Charset.forName("UTF-16"), query.getCharset());
458 }
459
460 @Test
461 public void hasContent() {

Callers

nothing calls this directly

Calls 3

fakeChannelMethod · 0.95
getCharsetMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected