1 18 package org.apache.activemq.management; 19 20 import org.apache.activemq.management.StatisticImpl; 21 22 import junit.framework.TestCase; 23 24 public abstract class StatisticTestSupport extends TestCase { 25 26 33 protected void assertStatistic(StatisticImpl counter, String name, String unit, String description) { 34 assertEquals(name, counter.getName()); 35 assertEquals(unit, counter.getUnit()); 36 assertEquals(description, counter.getDescription()); 37 } 38 39 43 protected void assertLastTimeNotStartTime(StatisticImpl counter) { 44 assertTrue("Should not have start time the same as last sample time. Start time: " + counter.getStartTime() + " lastTime: " + counter.getLastSampleTime(), counter.getStartTime() != counter.getLastSampleTime()); 45 } 46 } 47 | Popular Tags |