提交 2f2268fc 编写于 作者: 浅梦2013's avatar 浅梦2013

mqtt topic 添加测试场景。

上级 90689eed
......@@ -47,6 +47,11 @@ public class TopicUtilTest {
Assert.assertFalse(TopicUtil.match("/iot/+/+/test", "/iot/abc/123/test/"));
Assert.assertTrue(TopicUtil.match("/iot/+/+/+", "/iot/abc/123/test"));
Assert.assertFalse(TopicUtil.match("/iot/+/+/+", "/iot/abc/123/test/"));
Assert.assertTrue(TopicUtil.match("/iot/+/test", "/iot/a/test"));
Assert.assertTrue(TopicUtil.match("/iot/+/test", "/iot/a/test"));
Assert.assertFalse(TopicUtil.match("/iot/+/+/+", "/iot/a//test/"));
Assert.assertFalse(TopicUtil.match("/iot/+/+/+", "/iot/a/b/c/"));
Assert.assertFalse(TopicUtil.match("/iot/+/+/+", "/iot/a"));
Assert.assertTrue(TopicUtil.match("#", "/iot/test"));
Assert.assertTrue(TopicUtil.match("/iot/test/#", "/iot/test"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册