Skip to content

Commit

Permalink
Merge pull request #1478 from AbhitejJohn/mstestsupport
Browse files Browse the repository at this point in the history
Support to run MSTest based tests
  • Loading branch information
DustinCampbell authored May 15, 2017
2 parents d92fa4e + 841b9a4 commit 6d0dfaa
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 6d0dfaa

Please sign in to comment.