示例#1
0
 @Test
 public void testFormatDateFor10Min() throws Exception {
   String expected = FormatterCalendar.format(FilterRange.R10MIN, date);
   table.setFormatterCalendar(FilterRange.R10MIN);
   table.setItems(items);
   Object firstPeriod = getFirstPeriod();
   assertEquals(expected, firstPeriod);
 }
示例#2
0
 @Test
 public void testTotal() throws Exception {
   table.setItems(items);
   assertItemAndValue(TimingsTable.PERIOD, TimingsTable.TOTAL);
   assertItemAndValue(TimingsType.MIN.getName(), "5");
   assertItemAndValue(TimingsType.MAX.getName(), "10");
   assertItemAndValue(TimingsType.AVG.getName(), "26");
   assertItemAndValue(TimingsType.P90.getName(), "19");
   assertItemAndValue(TimingsType.P95.getName(), "13");
   assertItemAndValue(TimingsType.P99.getName(), "25");
   assertItemAndValue(TimingsType.QUERIES.getName(), "7");
   assertItemAndValue(TimingsType.ERRORS.getName(), "17");
 }
示例#3
0
 @Test
 public void testClearTotal() throws Exception {
   table.setItems(items);
   testTotal();
 }
示例#4
0
 @Test
 public void testRemoveAllItems() throws Exception {
   table.setItems(items);
   testCountRows();
 }
示例#5
0
 @Test
 public void testCountRows() throws Exception {
   table.setItems(items);
   int size = table.getItemIds().size();
   assertEquals(3, size);
 }