use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class WallTruncateTest method testMySql_false.
public void testMySql_false() throws Exception {
WallConfig config = new WallConfig();
config.setTruncateAllow(false);
Assert.assertFalse(WallUtils.isValidateMySql(sql, config));
}
use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class WallTruncateTest method testORACLE_false.
public void testORACLE_false() throws Exception {
WallConfig config = new WallConfig();
config.setTruncateAllow(false);
Assert.assertFalse(WallUtils.isValidateOracle(sql, config));
}
use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class WallConfigTest method test_selectAllow.
public void test_selectAllow() throws Exception {
Properties properties = new Properties();
properties.setProperty("druid.wall.selelctAllow", "true");
WallConfig config = new WallConfig();
config.configFromProperties(properties);
Assert.assertTrue(config.isSelelctAllow());
}
use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class WallConfigTest method test_deleteAllow.
public void test_deleteAllow() throws Exception {
Properties properties = new Properties();
properties.setProperty("druid.wall.deleteAllow", "true");
WallConfig config = new WallConfig();
config.configFromProperties(properties);
Assert.assertTrue(config.isDeleteAllow());
}
use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class WallDeleteWhereTest1 method testMySql_false.
public void testMySql_false() throws Exception {
WallConfig config = new WallConfig();
config.setDeleteWhereNoneCheck(true);
Assert.assertFalse(WallUtils.isValidateMySql(sql, config));
}
Aggregations