Skip to content

Commit c3d5324

Browse files
committed
Added test cases for checking test data for list types and the Else directive.
1 parent 88ac1e9 commit c3d5324

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/test/testData/src/main/resources/META-INF/doma/example/dao/inspection/TestDataCheckDao/commentBlock.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ SELECT e.employee_id AS employeeId
88
FROM employee e
99
/*%! This comment will be removed */
1010
WHERE e.employee_id = <error descr="Bind variables must be followed by test data">/*^ id */</error>
11-
AND e.age >= /*^ literalAge */99
11+
AND e.age >= /*^ literalAge */99
12+
AND e.sub_id IN /* subIds */(1,2,3)

src/test/testData/src/main/resources/META-INF/doma/example/dao/inspection/TestDataCheckDao/conditionAndLoopDirective.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ SELECT *
44
/*%for project : projects */
55
employee_name LIKE /* project.projectName */'hoge'
66
/*%if project_has_next */
7+
/*%if project.projectName.startsWith("A") */
78
/*# "or" */
9+
/*%else */
10+
/*! delete comment */
11+
and name = /* project.projectName */'testName'
12+
/*# "or" */
13+
/*%end */
814
/*%end */
915
/*%end*/
1016
OR salary > 1000

0 commit comments

Comments
 (0)