use of com.alibaba.druid.wall.spi.SQLServerWallProvider in project druid by alibaba.
the class SQLServerWallTest_8 method test_true.
public void test_true() throws Exception {
WallProvider provider = new SQLServerWallProvider();
provider.getConfig().setMustParameterized(true);
Assert.assertFalse(provider.checkValid("select * from t where fid = 1"));
}
use of com.alibaba.druid.wall.spi.SQLServerWallProvider in project druid by alibaba.
the class SQLServerWallTest_3 method test_true.
public void test_true() throws Exception {
WallProvider provider = new SQLServerWallProvider();
provider.getConfig().setSelectHavingAlwayTrueCheck(true);
Assert.assertFalse(//
provider.checkValid("select * from t where LEN(HOST_NAME()) > 0"));
Assert.assertEquals(1, provider.getTableStats().size());
Assert.assertTrue(provider.getTableStats().containsKey("t"));
}
Aggregations