using Nonemm.Digital; namespace Nonemm.Digital.Tests; public class WindowsControlSetupTests { [Fact] public void ASixtyFourBitWindowsRegistersWithTheCopyInSysWow64() { string windows = Directory.CreateTempSubdirectory().FullName; Directory.CreateDirectory(Path.Combine(windows, "SysWOW64")); Assert.Equal( Path.Combine(windows, "SysWOW64", "regsvr32.exe"), WindowsControlSetup.Regsvr32Path(windows)); } [Fact] public void AThirtyTwoBitWindowsRegistersWithTheCopyInSystem32() { string windows = Directory.CreateTempSubdirectory().FullName; Assert.Equal( Path.Combine(windows, "System32", "regsvr32.exe"), WindowsControlSetup.Regsvr32Path(windows)); } [Fact] public async Task AControlThatIsNotThereIsSaidSo() { await Assert.ThrowsAsync( () => new WindowsControlSetup().RegisterAsync("/nowhere/XMMT.ocx")); } }