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

Method deserialize

test/meta/TestUIDMeta.java:126–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124 }
125
126 @Test
127 public void deserialize() throws Exception {
128 String json = "{\"uid\":\"ABCD\",\"type\":\"MeTriC\",\"name\":\"MyName\"," +
129 "\"description\":\"Description\",\"notes\":\"MyNotes\",\"created\":" +
130 "1328140801,\"displayName\":\"Empty\",\"unknownkey\":null}";
131 meta = JSON.parseToObject(json, UIDMeta.class);
132 assertNotNull(meta);
133 assertEquals(meta.getUID(), "ABCD");
134 assertEquals(UniqueIdType.METRIC, meta.getType());
135 assertEquals("MyNotes", meta.getNotes());
136 assertEquals("Empty", meta.getDisplayName());
137 }
138
139 @Test
140 public void getUIDMeta() throws Exception {

Callers

nothing calls this directly

Calls 5

parseToObjectMethod · 0.95
getUIDMethod · 0.45
getTypeMethod · 0.45
getNotesMethod · 0.45
getDisplayNameMethod · 0.45

Tested by

no test coverage detected