File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -57,12 +57,17 @@ query string noTestCaseGenerated() {
5757 not exists ( any ( TestCase tc ) .getATestSnippetForRow ( result ) )
5858}
5959
60+ /**
61+ * Gets a valid test case, i.e. one that has a test snippet.
62+ */
63+ TestCase getAValidTestCase ( ) { exists ( result .getATestSnippetForRow ( _) ) }
64+
6065/**
6166 * Returns an import statement to include in the test case header.
6267 */
6368string getAnImportStatement ( ) {
6469 exists ( RefType t |
65- t = any ( TestCase tc ) .getADesiredImport ( ) and
70+ t = getAValidTestCase ( ) .getADesiredImport ( ) and
6671 isImportable ( t ) and
6772 t .getPackage ( ) .getName ( ) != "java.lang"
6873 |
@@ -76,7 +81,7 @@ string getAnImportStatement() {
7681SupportMethod getASupportMethod ( ) {
7782 result instanceof SourceMethod or
7883 result instanceof SinkMethod or
79- result = any ( TestCase tc ) .getASupportMethod ( )
84+ result = getAValidTestCase ( ) .getASupportMethod ( )
8085}
8186
8287/**
You can’t perform that action at this time.
0 commit comments