MCPcopy
hub / github.com/OpenTSDB/opentsdb / setSerializerDefaultCT

Method setSerializerDefaultCT

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

Source from the content-addressed store, hash-verified

760 }
761
762 @Test
763 public void setSerializerDefaultCT() throws Exception {
764 HttpQuery.initializeSerializerMaps(null);
765 final Channel channelMock = NettyMocks.fakeChannel();
766 final HttpRequest req = new DefaultHttpRequest(HttpVersion.HTTP_1_1,
767 HttpMethod.GET, "/");
768 req.headers().add("Content-Type", "invalid/notfoundtype");
769 final HttpQuery query = new HttpQuery(tsdb, req, channelMock);
770 query.setSerializer();
771 assertEquals(HttpJsonSerializer.class.getCanonicalName(),
772 query.serializer().getClass().getCanonicalName());
773 }
774
775 @Test (expected = BadRequestException.class)
776 public void setSerializerNotFound() throws Exception {

Callers

nothing calls this directly

Calls 5

fakeChannelMethod · 0.95
setSerializerMethod · 0.95
serializerMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected