private void helperTestAdd(MetadataCounterGroup counters) { counters.addToCount(1, dataType, fieldName, date); counters.addToCount(1, dataType, fieldName, date); assertOneEntryWithExpectedCount(counters, 2); }
@Test public void testCountsDownCorrectly() { MetadataCounterGroup counters = new MetadataCounterGroup(COLUMN_FAMILY); counters.addToCount(-5, dataType, fieldName, date); counters.addToCount(-5, dataType, fieldName, date); assertOneEntryWithExpectedCount(counters, -10); }
@Test public void testCountsUpAndDownCorrectly() { MetadataCounterGroup counters = new MetadataCounterGroup(COLUMN_FAMILY); counters.addToCount(1, dataType, fieldName, date); counters.addToCount(1, dataType, fieldName, date); counters.addToCount(-1, dataType, fieldName, date); assertOneEntryWithExpectedCount(counters, 1); }