edgetriggeredalarmdirectiontest.java
来自「关于 RFID 读写器的相关内容」· Java 代码 · 共 53 行
JAVA
53 行
package org.fosstrak.reader.rprm.core.mgmt.alarm;
import org.fosstrak.reader.rprm.core.mgmt.alarm.EdgeTriggeredAlarmDirection;
import junit.framework.TestCase;
/**
* Tests for the class <code>org.fosstrak.reader.mgmt.alarm.EdgeTriggeredAlarmDirection</code>.
*/
public class EdgeTriggeredAlarmDirectionTest extends TestCase {
/**
* Sets up the test.
* @exception Exception An error occurred
*/
protected final void setUp() throws Exception {
super.setUp();
}
/**
* Does the cleanup.
* @exception Exception An error occurred
*/
protected final void tearDown() throws Exception {
super.tearDown();
}
/**
* Tests the <code>toInt()</code> method.
*/
public final void testToInt() {
assertEquals(0, EdgeTriggeredAlarmDirection.RISING.toInt());
assertEquals(1, EdgeTriggeredAlarmDirection.FALLING.toInt());
}
/**
* Tests the <code>intToEnum()</code> method.
*/
public final void testIntToEnum() {
assertEquals(EdgeTriggeredAlarmDirection.RISING, EdgeTriggeredAlarmDirection.intToEnum(0));
assertEquals(EdgeTriggeredAlarmDirection.FALLING, EdgeTriggeredAlarmDirection.intToEnum(1));
}
/**
* Runs the test using the gui runner.
* @param args No arguments
*/
public static void main(String[] args) {
junit.swingui.TestRunner.run(EdgeTriggeredAlarmDirectionTest.class);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?