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

Method sortTestWithNullKey

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

Source from the content-addressed store, hash-verified

183 }
184
185 @Test
186 public void sortTestWithNullKey() {
187 List<ByteArrayPair> pairs = new ArrayList<ByteArrayPair>(2);
188 pairs.add(new ByteArrayPair(val, key));
189 pairs.add(new ByteArrayPair(null, val));
190 Collections.sort(pairs);
191 assertNull(pairs.get(0).getKey());
192 assertArrayEquals(val, pairs.get(0).getValue());
193 assertArrayEquals(val, pairs.get(1).getKey());
194 assertArrayEquals(key, pairs.get(1).getValue());
195 }
196
197 @Test
198 public void sortTestonValue() {

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