以下のクラスのテストケースの書き方。データベース内の指定されたクエリの値をチェックします。
public class DboQueryCheck {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Start DboDaoService");
DboDaoService dboDaoServcice = new DboDaoService();
dboDaoServcice.build();
String query = " select o.org_name, l.organization_id from " +
" code_value cv,code_value cv_loc,code_value_outbound cvo,location l,organization o" +
" where " +
" (cv.cdf_meaning = 'INGENI' or cv.cdf_meaning = 'MEDNEC')" +
" and cvo.contributor_source_cd = cv.code_value" +
" and cvo.alias_type_meaning = 'FACILITY'" +
" and l.location_cd = cvo.code_value" +
" and cv_loc.code_value = l.location_cd" +
" and cv_loc.code_set = 220" +
" and o.organization_id = l.organization_id" +
" order by o.org_name, cv_loc.display, cv.cdf_meaning";
System.out.println();
dboDaoServcice.report(query);
}
}