Skip to content

Commit

Permalink
Changes to enable MSTest based tests in vscode.
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhitejJohn committed May 12, 2017
1 parent d92fa4e commit 875858a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/features/dotnetTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,19 @@ export function updateCodeLensForTest(bucket: vscode.CodeLens[], fileName: strin
return;
}

let testFeature = node.Features.find(value => (value.Name == 'XunitTestMethod' || value.Name == 'NUnitTestMethod'));
let testFeature = node.Features.find(value => (value.Name == 'XunitTestMethod' || value.Name == 'NUnitTestMethod' || value.Name == 'MSTestMethod'));
if (testFeature) {
// this test method has a test feature
let testFrameworkName = testFeature.Name == 'XunitTestMethod' ? 'xunit' : 'nunit';
let testFrameworkName = 'xunit'
if(testFeature.Name == 'NunitTestMethod')
{
testFrameworkName = 'nunit';
}
else if(testFeature.Name == 'MSTestMethod')
{
testFrameworkName = 'mstest'
}

bucket.push(new vscode.CodeLens(
toRange(node.Location),
{ title: "run test", command: 'dotnet.test.run', arguments: [testFeature.Data, fileName, testFrameworkName] }));
Expand Down

0 comments on commit 875858a

Please sign in to comment.