|
|
@@ -0,0 +1,35 @@
|
|
|
+package com.nb.admin;
|
|
|
+
|
|
|
+import com.nb.bus.registry.device.DeviceOperator;
|
|
|
+import com.nb.bus.registry.device.DeviceRegistry;
|
|
|
+import org.junit.Test;
|
|
|
+import org.junit.runner.RunWith;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
|
|
+import org.springframework.boot.test.context.SpringBootTest;
|
|
|
+import org.springframework.test.context.junit4.SpringRunner;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author lifang
|
|
|
+ * @version 1.0.0
|
|
|
+ * @ClassName DeviceOperateTest.java
|
|
|
+ * @Description TODO
|
|
|
+ * @createTime 2022年07月29日 13:41:00
|
|
|
+ */
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
+@SpringBootTest(classes = AdminApplication.class)
|
|
|
+public class DeviceOperateTest {
|
|
|
+ @Autowired
|
|
|
+ private DeviceRegistry deviceRegistry;
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void test(){
|
|
|
+ DeviceOperator operator = deviceRegistry.getOperator("51066208333702B6");
|
|
|
+
|
|
|
+ operator.setFlowLimit(true);
|
|
|
+ boolean flowLimit = operator.isFlowLimit();
|
|
|
+ while (true){
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|