Assert.isTrue 用法

 String shippWay = "MM";

boolean expression = shippWay.equals(ShippingWayEnum.ZT.getCode());
System.out.println("Assert.isTrue报错");
 shippWay = "ZT";
 expression = shippWay.equals(ShippingWayEnum.ZT.getCode());
System.out.println(" Assert.isTrue 不报错");
String status = "600";
expression = status.equals("600");
System.out.println("600==600  Assert.isNotTrue 报错");
BigDecimal requestQty = new BigDecimal(10);
BigDecimal total = new BigDecimal(10);
expression = requestQty.compareTo(total) > 0 ;
System.out.println("a>b  Assert.isNotTrue 不报错");

 

上一篇:el-table动态列筛选


下一篇:js-事件1_获取鼠标坐标clientX+scrollLeft及兼容性写法_跟随鼠标移动的divs