namespace XFESystem.NativeRuntime.Application { // Compile only the actual network boundary without building the application // or loading a native HAL on Windows. Any use of its platform is a test failure. internal static class NativePlatform { internal static long Milliseconds() => throw new InvalidOperationException("A host negative-control test must not call the native platform."); internal static void Write(string text) => throw new InvalidOperationException("A host negative-control test must not call the native platform."); } } namespace XFESystem.Network.Tests { public sealed class NativeNetworkBoundaryTests { [Fact] public void MissingStrongEntropyRejectsBeforeAnyPciDmaOrNativeCall() { Assert.Throws(() => NativeRuntime.Application.Network.NativeNetwork.ConfigureEntropy(null!)); var error = Assert.Throws(() => NativeRuntime.Application.Network.NativeNetwork.OpenTcp("www.bing.com", 443)); Assert.Contains("strong random", error.Message); } } }