@@ -41,6 +41,7 @@ abstract class TestCodeLens extends OmniSharpCodeLens {
41
41
constructor (
42
42
range : protocol . V2 . Range ,
43
43
fileName : string ,
44
+ public displayName : string ,
44
45
public isTestContainer : boolean ,
45
46
public testFramework : string ,
46
47
public testMethodNames : string [ ] ) {
@@ -53,23 +54,25 @@ class RunTestsCodeLens extends TestCodeLens {
53
54
constructor (
54
55
range : protocol . V2 . Range ,
55
56
fileName : string ,
57
+ displayName : string ,
56
58
isTestContainer : boolean ,
57
59
testFramework : string ,
58
60
testMethodNames : string [ ] ) {
59
61
60
- super ( range , fileName , isTestContainer , testFramework , testMethodNames ) ;
62
+ super ( range , fileName , displayName , isTestContainer , testFramework , testMethodNames ) ;
61
63
}
62
64
}
63
65
64
66
class DebugTestsCodeLens extends TestCodeLens {
65
67
constructor (
66
68
range : protocol . V2 . Range ,
67
69
fileName : string ,
70
+ displayName : string ,
68
71
isTestContainer : boolean ,
69
72
testFramework : string ,
70
73
testMethodNames : string [ ] ) {
71
74
72
- super ( range , fileName , isTestContainer , testFramework , testMethodNames ) ;
75
+ super ( range , fileName , displayName , isTestContainer , testFramework , testMethodNames ) ;
73
76
}
74
77
}
75
78
@@ -152,7 +155,7 @@ export default class OmniSharpCodeLensProvider extends AbstractProvider implemen
152
155
codeLens . command = {
153
156
title : pluralTitle ,
154
157
command : pluralCommandName ,
155
- arguments : [ codeLens . testMethodNames , codeLens . fileName , codeLens . testFramework ]
158
+ arguments : [ codeLens . displayName , codeLens . testMethodNames , codeLens . fileName , codeLens . testFramework ]
156
159
} ;
157
160
}
158
161
@@ -188,8 +191,8 @@ function createCodeLensesForElement(element: Structure.CodeElement, fileName: st
188
191
let range = element . Ranges [ SymbolRangeNames . Name ] ;
189
192
190
193
if ( range && testFramework && testMethodName ) {
191
- results . push ( new RunTestsCodeLens ( range , fileName , /*isTestContainer*/ false , testFramework , [ testMethodName ] ) ) ;
192
- results . push ( new DebugTestsCodeLens ( range , fileName , /*isTestContainer*/ false , testFramework , [ testMethodName ] ) ) ;
194
+ results . push ( new RunTestsCodeLens ( range , fileName , element . DisplayName , /*isTestContainer*/ false , testFramework , [ testMethodName ] ) ) ;
195
+ results . push ( new DebugTestsCodeLens ( range , fileName , element . DisplayName , /*isTestContainer*/ false , testFramework , [ testMethodName ] ) ) ;
193
196
}
194
197
}
195
198
else if ( isValidClassForTestCodeLens ( element ) ) {
@@ -210,8 +213,8 @@ function createCodeLensesForElement(element: Structure.CodeElement, fileName: st
210
213
}
211
214
}
212
215
213
- results . push ( new RunTestsCodeLens ( range , fileName , /*isTestContainer*/ true , testFramework , testMethodNames ) ) ;
214
- results . push ( new DebugTestsCodeLens ( range , fileName , /*isTestContainer*/ true , testFramework , testMethodNames ) ) ;
216
+ results . push ( new RunTestsCodeLens ( range , fileName , element . DisplayName , /*isTestContainer*/ true , testFramework , testMethodNames ) ) ;
217
+ results . push ( new DebugTestsCodeLens ( range , fileName , element . DisplayName , /*isTestContainer*/ true , testFramework , testMethodNames ) ) ;
215
218
}
216
219
}
217
220
0 commit comments