Search in sources :

Example 6 with TimeType

use of com.cubrid.cubridmanager.core.monstatistic.model.StatisticParamUtil.TimeType in project cubrid-manager by CUBRID.

the class StatisticParamUtilTest method testTimeType.

public void testTimeType() {
    for (TimeType type : TimeType.values()) {
        assertNotNull(type.getMessage());
        assertNotNull(type.getType());
        switch(type) {
            case DAILY:
                assertEquals(TimeType.getEnumByMessage(type.getMessage()), type);
                assertEquals(TimeType.getEnumByMessage(type.getType()), type);
                break;
            case WEEKLY:
                assertEquals(TimeType.getEnumByMessage(type.getMessage()), type);
                assertEquals(TimeType.getEnumByMessage(type.getType()), type);
                break;
            case MONTHLY:
                assertEquals(TimeType.getEnumByMessage(type.getMessage()), type);
                assertEquals(TimeType.getEnumByMessage(type.getType()), type);
                break;
            case YEARLY:
                assertEquals(TimeType.getEnumByMessage(type.getMessage()), type);
                assertEquals(TimeType.getEnumByMessage(type.getType()), type);
                break;
            default:
        }
    }
}
Also used : TimeType(com.cubrid.cubridmanager.core.monstatistic.model.StatisticParamUtil.TimeType)

Aggregations

TimeType (com.cubrid.cubridmanager.core.monstatistic.model.StatisticParamUtil.TimeType)6 MetricType (com.cubrid.cubridmanager.core.monstatistic.model.StatisticParamUtil.MetricType)2 GridData (org.eclipse.swt.layout.GridData)2 GridLayout (org.eclipse.swt.layout.GridLayout)2 Combo (org.eclipse.swt.widgets.Combo)2 Composite (org.eclipse.swt.widgets.Composite)2 Label (org.eclipse.swt.widgets.Label)2 SingleHostChartItem (com.cubrid.cubridmanager.core.monstatistic.model.SingleHostChartItem)1 StatisticData (com.cubrid.cubridmanager.core.monstatistic.model.StatisticData)1 StatisticType (com.cubrid.cubridmanager.core.monstatistic.model.StatisticParamUtil.StatisticType)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 Button (org.eclipse.swt.widgets.Button)1 Control (org.eclipse.swt.widgets.Control)1 Group (org.eclipse.swt.widgets.Group)1 Text (org.eclipse.swt.widgets.Text)1 Day (org.jfree.data.time.Day)1 Hour (org.jfree.data.time.Hour)1 Second (org.jfree.data.time.Second)1 TimeSeries (org.jfree.data.time.TimeSeries)1