diff --git a/src/sdk.tests/SdkNuGetTests.cs b/src/sdk.tests/SdkNuGetTests.cs index daab200..c0af84d 100644 --- a/src/sdk.tests/SdkNuGetTests.cs +++ b/src/sdk.tests/SdkNuGetTests.cs @@ -46,6 +46,8 @@ internal sealed class SdkNuGetTests var output = await project.RunAsync("dotnet", "build"); // Assert + Console.WriteLine(output.StdOut); + Console.WriteLine(output.StdErr); await Assert.That(output.ExitCode).IsZero(); await Assert.That(project.File("bin", "Debug", "net10.0", "project.dll")).Exists(); } diff --git a/src/sdk.tests/Shared/Project.cs b/src/sdk.tests/Shared/Project.cs index eee1ec6..78ec8a1 100644 --- a/src/sdk.tests/Shared/Project.cs +++ b/src/sdk.tests/Shared/Project.cs @@ -6,20 +6,24 @@ namespace Geekeey.Arcade.NET.Tests.Shared; internal sealed class Project : IDisposable { private readonly DirectoryInfo _root; + private readonly DirectoryInfo _source; + private readonly DirectoryInfo _packages; private readonly Command _shell; public Project(DirectoryInfo 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("TUNIT_DISABLE_GITHUB_REPORTER", "true") - .WithEnvironment("NUGET_PACKAGES", System.IO.Path.Combine(_root.FullName, "packages")); + .WithEnvironment("NUGET_PACKAGES", _packages.FullName); } public string Path { - get => _root.FullName; + get => _source.FullName; } public Task RunAsync(string exe, params IReadOnlyList args) @@ -29,17 +33,17 @@ internal sealed class Project : IDisposable public void CopyFrom(string path) { - System.IO.Directory.Copy(path, _root.FullName); + System.IO.Directory.Copy(path, _source.FullName); } public FileInfo File(params IReadOnlyList 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 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)