Skip to content

Commit 8e0369f

Browse files
MchKosticyndvvrd
authored andcommitted
[fix] style fixes for UTBot integration
1 parent 0f15a8d commit 8e0369f

4 files changed

Lines changed: 11 additions & 13 deletions

File tree

VSharp.API/VSharp.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public void GenerateReport(TextWriter writer)
129129
/// <summary>
130130
/// Gets all generated '.vst' files
131131
/// </summary>
132-
internal IEnumerable<FileInfo> Results()
132+
public IEnumerable<FileInfo> Results()
133133
{
134134
return OutputDir.GetFiles("*.vst");
135135
}

VSharp.CSharpUtils/VSharp.CSharpUtils.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="CsvHelper" Version="30.0.1" />
1615
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.0.0" />
1716
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="3.0.0" />
1817
</ItemGroup>

VSharp.TestRenderer/RendererTool.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,23 +471,28 @@ private static (SyntaxNode, SyntaxNode?, string, Assembly) RunTestsRenderer(
471471
}
472472

473473
// Writing generated tests and mocks to files
474-
private static void WriteResults(
474+
private static List<string> WriteResults(
475475
DirectoryInfo outputDir,
476476
string typeName,
477477
SyntaxNode testsProgram,
478478
SyntaxNode? mocksProgram)
479479
{
480+
var files = new List<string>();
480481
var testFilePath = Path.Combine(outputDir.FullName, $"{typeName}Tests.cs");
481482
AddRenderedInFile(testFilePath, testsProgram);
483+
files.Add(testFilePath);
482484
if (mocksProgram != null)
483485
{
484486
var mocksFilePath = Path.Combine(outputDir.FullName, "Mocks.cs");
485487
AddRenderedInFile(mocksFilePath, mocksProgram);
488+
files.Add(mocksFilePath);
486489
}
490+
491+
return files;
487492
}
488493

489494
// API method for Rider extension
490-
public static DirectoryInfo Render(
495+
public static (DirectoryInfo, List<string>) Render(
491496
IEnumerable<FileInfo> tests,
492497
FileInfo testingProject,
493498
Type declaringType,
@@ -500,9 +505,9 @@ public static DirectoryInfo Render(
500505
var outputDir = testingProject.Directory?.Parent;
501506
Debug.Assert(outputDir != null && outputDir.Exists);
502507
var testProjectPath = GenerateTestProject(outputDir, testingProject, solutionForTests);
503-
WriteResults(outputDir, typeName, testsProgram, mocksProgram);
508+
var renderedFiles = WriteResults(outputDir, typeName, testsProgram, mocksProgram);
504509

505-
return testProjectPath;
510+
return (testProjectPath, renderedFiles);
506511
}
507512

508513
// API method for VSharp

VSharp.TestRenderer/VSharp.TestRenderer.csproj

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,7 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3">
13-
<PrivateAssets>all</PrivateAssets>
14-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
15-
</PackageReference>
16-
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.2.0" />
17-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.2.0" />
18-
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.2.0" />
12+
<PackageReference Include="JetBrains.Roslyn.References.Repack" Version="42.42.20220228.125130" />
1913
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21308.1" />
2014
</ItemGroup>
2115

0 commit comments

Comments
 (0)