public void PipeAuthorization_CheckPath_InvalidPathTest() { this.communicatorServer = new PipeCommunicatorServer("CA25C0E2-72DE-46DC-845B-01A92E633D2B"); this.communicatorServer.Start(); PipeAuthorizationChecker checker = new PipeAuthorizationChecker(); this.communicatorServer.AuthorizationChecker = checker; checker.PathList.Clear(); this.channelFactory = new PipeChannelFactory(); IMessenger messenger = this.channelFactory.GetMessenger("pipe://CA25C0E2-72DE-46DC-845B-01A92E633D2B"); messenger.Send("test"); }
public void PipeAuthorization_CheckPathTest() { this.communicatorServer = new PipeCommunicatorServer("CA25C0E2-72DE-46DC-845B-01A92E633D2B"); this.communicatorServer.Start(); PipeAuthorizationChecker checker = new PipeAuthorizationChecker { EnableAuthenticodeCheck = false }; this.communicatorServer.AuthorizationChecker = checker; this.channelFactory = new PipeChannelFactory(); IMessenger messenger = this.channelFactory.GetMessenger("pipe://CA25C0E2-72DE-46DC-845B-01A92E633D2B"); messenger.Send("test"); }
public void PipeAuthorization_CheckSignatureTest() { this.communicatorServer = new PipeCommunicatorServer("CA25C0E2-72DE-46DC-845B-01A92E633D2B"); this.communicatorServer.Start(); PipeAuthorizationChecker checker = new PipeAuthorizationChecker(); this.communicatorServer.AuthorizationChecker = checker; string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PipeConnectorTest.exe"); var statrupInfo = new ProcessStartInfo { FileName = path, Arguments = "CA25C0E2-72DE-46DC-845B-01A92E633D2B", CreateNoWindow = true, UseShellExecute = false, }; using (var process = Process.Start(statrupInfo)) { WaitHelpers.WaitUntil(() => process.HasExited); Assert.AreEqual(0, process.ExitCode); } }