package jp.ehobby.util.syslog; import static org.junit.Assert.*; import static jp.ehobby.util.syslog.SyslogSeverity.*; import org.junit.Test; /** * SyslogSeverity 単体テスト. */ @SuppressWarnings("static-method") public class SyslogSeverityTest { /** 単体テスト用 Severity リスト. */ private static final SyslogSeverity[] SEVERITY_LIST = { EMERGENCY, ALERT, CRITICAL, ERROR, WARNING, NOTICE, INFORMATIONAL, DEBUG }; /** * 値取得確認. * * @method getValue() * @process getValue にて値を取得する. * @spec それぞれの Severity 応じた値が取得されること. */ @Test public void testGetValue() { for (int i = 0; i < SEVERITY_LIST.length; i++) { int val = SEVERITY_LIST[i].getValue(); assertEquals(i, val); } } }