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

Method sortTestonValue

test/utils/TestByteArrayPair.java:197–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195 }
196
197 @Test
198 public void sortTestonValue() {
199 List<ByteArrayPair> pairs = new ArrayList<ByteArrayPair>(3);
200 pairs.add(new ByteArrayPair(val, key));
201 pairs.add(new ByteArrayPair(key, val2));
202 pairs.add(new ByteArrayPair(key, val));
203
204 Collections.sort(pairs);
205 assertArrayEquals(key, pairs.get(0).getKey());
206 assertArrayEquals(val, pairs.get(0).getValue());
207 assertArrayEquals(key, pairs.get(1).getKey());
208 assertArrayEquals(val2, pairs.get(1).getValue());
209 assertArrayEquals(val, pairs.get(2).getKey());
210 assertArrayEquals(key, pairs.get(2).getValue());
211 }
212}

Callers

nothing calls this directly

Calls 4

addMethod · 0.45
getKeyMethod · 0.45
getMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected