message: Fix issue with classes that contain a single test method
diff: @@ -41,6 +41,7 @@ abstract class TestCodeLens extends OmniSharpCodeLens {
  constructor(
  range: protocol.V2.Range,
  fileName: string,
  + public isTestContainer: boolean,
  public testFramework: string,
  public testMethodNames: string[]) {
  @@ -52,10 +53,11 @@ class RunTestsCodeLens extends TestCodeLens {
  constructor(
  range: protocol.V2.Range,
  fileName: string,
  + isTestContainer: boolean,
  testFramework: string,
  testMethodNames: string[]) {
  - super(range, fileName, testFramework, testMethodNames);
  + super(range, fileName, isTestContainer, testFramework, testMethodNames);
  }
  }
  @@ -63,10 +65,11 @@ class DebugTestsCodeLens extends TestCodeLens {
  constructor(
  range: protocol.V2.Range,
  fileName: string,
  + isTestContainer: boolean,
  testFramework: string,
  testMethodNames: string[]) {
  - super(range, fileName, testFramework, testMethodNames);
  + super(range, fileName, isTestContainer, testFramework, testMethodNames);
  }
  }
  @@ -131,7 +134,8 @@ export default class OmniSharpCodeLensProvider extends AbstractProvider implemen
  }
  private async resolveTestCodeLens(codeLens: TestCodeLens, singularTitle: string, singularCommandName: string, pluralTitle: string, pluralCommandName: string): Promise<vscode.CodeLens> {
  - if (codeLens.testMethodNames.length === 1) {
  + if (!codeLens.isTestContainer) {
  + // This is just a single test method, not a container.
  codeLens.command = {
  title: singularTitle,
  command: singularCommandName,
  @@ -140,7 +144,7 @@ export default class OmniSharpCodeLensProvider extends AbstractProvider implemen
  return codeLens;
  }
  - else if (codeLens.testMethodNames.length > 1) {
  +
  const projectInfo = await serverUtils.requestProjectInformation(this._server, { FileName: codeLens.fileName });
  // We do not support running all tests on legacy projects.
  @@ -155,7 +159,6 @@ export default class OmniSharpCodeLensProvider extends AbstractProvider implemen
  return codeLens;
  }
  }
  -}
  function createCodeLenses(elements: Structure.CodeElement[], fileName: string, options: Options): vscode.CodeLens[] {
  let results: vscode.CodeLens[] = [];
  @@ -185,8 +188,8 @@ function createCodeLensesForElement(element: Structure.CodeElement, fileName: st
  let range = element.Ranges[SymbolRangeNames.Name];
  if (range && testFramework && testMethodName) {
  - results.push(new RunTestsCodeLens(range, fileName, testFramework, [testMethodName]));
  - results.push(new DebugTestsCodeLens(range, fileName, testFramework, [testMethodName]));
  + results.push(new RunTestsCodeLens(range, fileName, /*isTestContainer*/ false, testFramework, [testMethodName]));
  + results.push(new DebugTestsCodeLens(range, fileName, /*isTestContainer*/ false, testFramework, [testMethodName]));
  }
  }
  else if (isValidClassForTestCodeLens(element)) {
  @@ -207,8 +210,8 @@ function createCodeLensesForElement(element: Structure.CodeElement, fileName: st
  }
  }
  - results.push(new RunTestsCodeLens(range, fileName, testFramework, testMethodNames));
  - results.push(new DebugTestsCodeLens(range, fileName, testFramework, testMethodNames));
  + results.push(new RunTestsCodeLens(range, fileName, /*isTestContainer*/ true, testFramework, testMethodNames));
  + results.push(new DebugTestsCodeLens(range, fileName, /*isTestContainer*/ true, testFramework, testMethodNames));
  }
  }
  