@@ -19,7 +19,7 @@ suite('Code Lens Tests', function() {
19
19
20
20
const codeLensProvider : TestCodeLensProvider = new TestCodeLensProvider ( ) ;
21
21
const codeLens : CodeLens [ ] = await codeLensProvider . provideCodeLenses ( document , Token . cancellationToken ) ;
22
- assert . equal ( codeLens . length , 4 , 'Code Lens should appear for @ParameterizedTest annotation' ) ;
22
+ assert . equal ( codeLens . length , 6 , 'Code Lens should appear for @ParameterizedTest annotation' ) ;
23
23
24
24
const command : Command | undefined = codeLens [ 0 ] . command ;
25
25
assert . notEqual ( command , undefined , 'Command inside Code Lens should not be undefined' ) ;
@@ -39,6 +39,26 @@ suite('Code Lens Tests', function() {
39
39
assert . ok ( passedDetail ! . duration !== undefined , 'Should have execution time' ) ;
40
40
} ) ;
41
41
42
+ test ( "Can get correct result" , async function ( ) {
43
+ const document : TextDocument = await workspace . openTextDocument ( Uris . GRADLE_JUNIT5_PARAMETERIZED_TEST ) ;
44
+ await window . showTextDocument ( document ) ;
45
+
46
+ const codeLensProvider : TestCodeLensProvider = new TestCodeLensProvider ( ) ;
47
+ const codeLens : CodeLens [ ] = await codeLensProvider . provideCodeLenses ( document , Token . cancellationToken ) ;
48
+
49
+ const command : Command | undefined = codeLens [ 2 ] . command ;
50
+
51
+ const testItem : ITestItem [ ] = command ! . arguments as ITestItem [ ] ;
52
+
53
+ await commands . executeCommand ( command ! . command , testItem [ 0 ] ) ;
54
+
55
+ const projectName : string = testItem [ 0 ] . project ;
56
+
57
+ const failedDetail : ITestResult | undefined = testResultManager . getResultById ( `${ projectName } @junit5.ParameterizedAnnotationTest#equal` ) ;
58
+ assert . equal ( failedDetail ! . status , TestStatus . Fail ) ;
59
+ assert . ok ( failedDetail ! . trace !== undefined , 'Should have error trace' ) ;
60
+ } ) ;
61
+
42
62
test ( "Can run test method annotated with @Testable" , async function ( ) {
43
63
const document : TextDocument = await workspace . openTextDocument ( Uris . GRADLE_JUNIT5_PROPERTY_TEST ) ;
44
64
await window . showTextDocument ( document ) ;
0 commit comments