public void FindInProjectNotsconfig() { // Folder b contains a tsconfig on disk that's not included in the VS project // Folder c contains a tsconfig in the VS project (tsconfigEmptyTest.csproj) that doesn't exist on disk // In both cases we don't lint with these string projectFullName = Path.GetFullPath(@"../../artifacts/tsconfig/none/tsconfigEmptyTest.csproj"); Project project = FindProject(projectFullName, solution); HashSet <string> results = new HashSet <string>(StringComparer.OrdinalIgnoreCase); TsconfigLocations.FindTsconfigsInProject(project, results); Assert.IsNotNull(results); Assert.AreEqual(0, results.Count); }
public void FindInProject() { string projectFullName = Path.GetFullPath(@"../../artifacts/tsconfig/multiple/tsconfigTest.csproj"); Project project = FindProject(projectFullName, solution); HashSet <string> results = new HashSet <string>(StringComparer.OrdinalIgnoreCase); TsconfigLocations.FindTsconfigsInProject(project, results); string expectedConfig1 = Path.GetFullPath(@"../../artifacts/tsconfig/multiple/tsconfig.json"); string expectedConfig2 = Path.GetFullPath(@"../../artifacts/tsconfig/multiple/a/tsconfig.json"); string expectedConfig3 = Path.GetFullPath(@"../../artifacts/tsconfig/multiple/b/tsconfig.json"); Assert.AreEqual(3, results.Count); Assert.IsTrue(results.Contains(expectedConfig1)); Assert.IsTrue(results.Contains(expectedConfig2)); Assert.IsTrue(results.Contains(expectedConfig3)); }