fuck
All checks were successful
CI / build (push) Successful in 2m43s

This commit is contained in:
Louis Seubert 2026-10-27 21:18:21 +01:00
commit aca3b3bacc
Signed by: louis9902
SSH key fingerprint: SHA256:HkW1JCsONisFW0uQchtmqod/1QUpxsEIxbg7aIquMX0
2 changed files with 12 additions and 6 deletions

View file

@ -46,6 +46,8 @@ internal sealed class SdkNuGetTests
var output = await project.RunAsync("dotnet", "build"); var output = await project.RunAsync("dotnet", "build");
// Assert // Assert
Console.WriteLine(output.StdOut);
Console.WriteLine(output.StdErr);
await Assert.That(output.ExitCode).IsZero(); await Assert.That(output.ExitCode).IsZero();
await Assert.That(project.File("bin", "Debug", "net10.0", "project.dll")).Exists(); await Assert.That(project.File("bin", "Debug", "net10.0", "project.dll")).Exists();
} }

View file

@ -6,20 +6,24 @@ namespace Geekeey.Arcade.NET.Tests.Shared;
internal sealed class Project : IDisposable internal sealed class Project : IDisposable
{ {
private readonly DirectoryInfo _root; private readonly DirectoryInfo _root;
private readonly DirectoryInfo _source;
private readonly DirectoryInfo _packages;
private readonly Command _shell; private readonly Command _shell;
public Project(DirectoryInfo root) public Project(DirectoryInfo root)
{ {
_root = root; _root = root;
_shell = Command.WithWorkingDirectory(_root.FullName) _source = _root.CreateSubdirectory("src");
_packages = _root.CreateSubdirectory("packages");
_shell = Command.WithWorkingDirectory(_source.FullName)
.WithEnvironment("DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER", "1") .WithEnvironment("DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER", "1")
.WithEnvironment("TUNIT_DISABLE_GITHUB_REPORTER", "true") .WithEnvironment("TUNIT_DISABLE_GITHUB_REPORTER", "true")
.WithEnvironment("NUGET_PACKAGES", System.IO.Path.Combine(_root.FullName, "packages")); .WithEnvironment("NUGET_PACKAGES", _packages.FullName);
} }
public string Path public string Path
{ {
get => _root.FullName; get => _source.FullName;
} }
public Task<CommandOutput> RunAsync(string exe, params IReadOnlyList<string> args) public Task<CommandOutput> RunAsync(string exe, params IReadOnlyList<string> args)
@ -29,17 +33,17 @@ internal sealed class Project : IDisposable
public void CopyFrom(string path) public void CopyFrom(string path)
{ {
System.IO.Directory.Copy(path, _root.FullName); System.IO.Directory.Copy(path, _source.FullName);
} }
public FileInfo File(params IReadOnlyList<string> path) public FileInfo File(params IReadOnlyList<string> path)
{ {
return new FileInfo(System.IO.Path.Combine([_root.FullName, .. path])); return new FileInfo(System.IO.Path.Combine([_source.FullName, .. path]));
} }
public DirectoryInfo Directory(params IReadOnlyList<string> path) public DirectoryInfo Directory(params IReadOnlyList<string> path)
{ {
return new DirectoryInfo(System.IO.Path.Combine([_root.FullName, .. path])); return new DirectoryInfo(System.IO.Path.Combine([_source.FullName, .. path]));
} }
public async Task Template(string path, string from, string insert) public async Task Template(string path, string from, string insert)