+ "<dynamic type=\"isNotEmpty\" append-before=\"and user_name = \" parameter-name=\"name\"/>"
+ "<dynamic type=\"isNotEmpty\" append-before=\"and email = \" parameter-name=\"email\"/>");
rd.setQueryType(QueryBuilder.QUERY_TYPE_DYNAMIC_PARAMETER);
rd.setupDefaultParameterDefinition();
ReportInstance instance = new ReportInstance();
instance.setReportDefinition(rd);
QueryParameter[] parameters = rd.getDefaultQueryParameters();
instance.generateItems(parameters);
assertEquals(5, instance.getTotalCount());
parameters = rd.getDefaultQueryParameters();
parameters[0].setValue("user1");
instance.generateItems(parameters);
assertEquals(1, instance.getTotalCount());
parameters = rd.getDefaultQueryParameters();
parameters[0].setValue("user1");
parameters[1].setValue("user2@javaeye.com");
instance.generateItems(parameters);
assertEquals(0, instance.getTotalCount());
}