REM:
1.  增加处置设备IP端口默认值判断测试用例
This commit is contained in:
huangxin 2021-01-28 10:47:25 +08:00
parent 0b0ffdfd5c
commit f170f59866
1 changed files with 16 additions and 0 deletions

View File

@ -666,4 +666,20 @@ public class demo {
log.info("demoList2 difference demoList1: {}", demoList.equals(demoList2));
log.info("tmpTable difference tmpTable: {}", tmpTable.equals(tmpTable2));
}
/**
* Ip port match test.
*/
@Test
public void ipPortMatchTest() {
String[] srcPort = new String[] {"", "80", "443", "81", null};
String[] dstPort = new String[] {"", "80", "443", "81", null};
for(String s : srcPort) {
for(String d : dstPort) {
log.info("HTTP: [{}] match [{}] is {}", s, d, Helper.isIpPortMatch(s, d, HttpType.HTTP));
log.info("HTTPS: [{}] match [{}] is {}", s, d, Helper.isIpPortMatch(s, d, HttpType.HTTPS));
}
}
}
}