feat: expose legacy launcher configuration workflow

This commit is contained in:
codex
2026-08-06 10:18:22 +03:00
parent 8d32f8e7ae
commit 0879d716dd
5 changed files with 71 additions and 5 deletions
@@ -0,0 +1,18 @@
using Launcher.Next.Autodesk;
using Xunit;
namespace Launcher.Next.Tests;
public sealed class PlantDiscoveryTests
{
private sealed class Registry(string? install) : IRegistryReader
{ public object? GetValue(string path,string name)=>path.Contains("ACAD-9117",StringComparison.Ordinal)&&name=="InstallDir"?install:null; }
[Fact]
public void Plant2026DiscoveryUsesPlantSpecificRegistryKey()
{
var directory=Path.Combine(Path.GetTempPath(),Guid.NewGuid().ToString("N"));Directory.CreateDirectory(Path.Combine(directory,"PLNT3D"));File.WriteAllBytes(Path.Combine(directory,"acad.exe"),[]);
try { var product=new PlantProductDiscovery(new Registry(directory)).DiscoverPlant3D(2026);Assert.NotNull(product);Assert.Equal("2026",product!.ProductVersion);Assert.Equal(Path.Combine(directory,"acad.exe"),product.ExecutablePath); }
finally { Directory.Delete(directory,true); }
}
}