improve WallFilter, support minusAllow

This commit is contained in:
wenshao
2013-03-19 01:25:59 +08:00
parent 19b24d8022
commit f1e6e0d937
3 changed files with 42 additions and 4 deletions
@@ -0,0 +1,23 @@
package com.alibaba.druid.bvt.filter.wall;
import junit.framework.TestCase;
import org.junit.Assert;
import com.alibaba.druid.wall.WallConfig;
import com.alibaba.druid.wall.WallUtils;
public class MinusTest extends TestCase {
public void test_false() throws Exception {
Assert.assertFalse(WallUtils.isValidateOracle(//
"SELECT * FROM A MINUS SELECT * FROM B")); //
}
public void test_true() throws Exception {
WallConfig config = new WallConfig();
config.setMinusAllow(true);
Assert.assertTrue(WallUtils.isValidateOracle(//
"SELECT * FROM A MINUS SELECT * FROM B", config)); //
}
}