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() {
57
57
not exists ( any ( TestCase tc ) .getATestSnippetForRow ( result ) )
58
58
}
59
59
60
+ /**
61
+ * Gets a valid test case, i.e. one that has a test snippet.
62
+ */
63
+ TestCase getAValidTestCase ( ) { exists ( result .getATestSnippetForRow ( _) ) }
64
+
60
65
/**
61
66
* Returns an import statement to include in the test case header.
62
67
*/
63
68
string getAnImportStatement ( ) {
64
69
exists ( RefType t |
65
- t = any ( TestCase tc ) .getADesiredImport ( ) and
70
+ t = getAValidTestCase ( ) .getADesiredImport ( ) and
66
71
isImportable ( t ) and
67
72
t .getPackage ( ) .getName ( ) != "java.lang"
68
73
|
@@ -76,7 +81,7 @@ string getAnImportStatement() {
76
81
SupportMethod getASupportMethod ( ) {
77
82
result instanceof SourceMethod or
78
83
result instanceof SinkMethod or
79
- result = any ( TestCase tc ) .getASupportMethod ( )
84
+ result = getAValidTestCase ( ) .getASupportMethod ( )
80
85
}
81
86
82
87
/**
You can’t perform that action at this time.
0 commit comments