use of org.dbflute.twowaysql.exception.IfCommentUnsupportedExpressionException in project dbflute-core by dbflute.
the class OutsideSqlCheckerTest method test_check_ifCommentExpression_unsupported.
public void test_check_ifCommentExpression_unsupported() {
// ## Arrange ##
DfOutsideSqlChecker ker = new DfOutsideSqlChecker();
String fn = "test.sql";
// ## Act & Assert ##
try {
ker.check(fn, "/*IF (pmb.memberId != null && pmb.memberName != null) || pmb.exists*/bar/*END*/");
} catch (IfCommentUnsupportedExpressionException e) {
// OK
log(e.getMessage());
}
try {
ker.check(fn, "/*IF pmb.memberId != null && pmb.memberName != null || pmb.exists*/bar/*END*/");
} catch (IfCommentUnsupportedExpressionException e) {
// OK
log(e.getMessage());
}
try {
ker.check(fn, "/*IF pmb.memberId = null && pmb.memberName != null*/bar/*END*/");
} catch (IfCommentUnsupportedExpressionException e) {
// OK
log(e.getMessage());
}
try {
ker.check(fn, "/*IF pmb.memberId <> null && pmb.memberName != null*/bar/*END*/");
} catch (IfCommentUnsupportedExpressionException e) {
// OK
log(e.getMessage());
}
try {
ker.check(fn, "/*IF pmb.memberName == \"abc\"*/bar/*END*/");
} catch (IfCommentUnsupportedExpressionException e) {
// OK
log(e.getMessage());
}
}
Aggregations