C#: Add unit tests for runtime version fetching.

This commit is contained in:
Michael Nebel
2023-07-07 13:03:01 +02:00
parent 4270425f14
commit f065ba9aa1
4 changed files with 98 additions and 5 deletions

View File

@@ -5,10 +5,18 @@ using Semmle.Util;
namespace Semmle.BuildAnalyser
{
internal interface IDotNet
{
bool RestoreToDirectory(string project, string directory);
bool New(string folder);
bool AddPackage(string folder, string package);
public IList<string> GetListedRuntimes();
}
/// <summary>
/// Utilities to run the "dotnet" command.
/// </summary>
internal class DotNet
internal class DotNet : IDotNet
{
private const string dotnet = "dotnet";
private readonly ProgressMonitor progressMonitor;