mirror of
https://github.com/cyanfish/naps2.git
synced 2024-09-11 15:26:55 +03:00
Tester the worker app channel
This commit is contained in:
parent
3eda15242a
commit
4d9a885700
@ -1,16 +1,22 @@
|
||||
using GrpcDotNetNamedPipes;
|
||||
using NAPS2.Remoting.Worker;
|
||||
using NAPS2.Sdk.Tests;
|
||||
using Xunit;
|
||||
|
||||
namespace NAPS2.App.Tests;
|
||||
|
||||
public class WorkerAppTests
|
||||
public class WorkerAppTests : ContextualTexts
|
||||
{
|
||||
[Fact]
|
||||
public void CreatesWindow()
|
||||
public void CreatesPipeServer()
|
||||
{
|
||||
var process = AppTestHelper.StartProcess("NAPS2.Worker.exe", Process.GetCurrentProcess().Id.ToString());
|
||||
try
|
||||
{
|
||||
Assert.Equal("ready", process.StandardOutput.ReadLine());
|
||||
string pipeName = $"NAPS2.Worker/{process.Id}";
|
||||
var client = new WorkerServiceAdapter(new NamedPipeChannel(".", pipeName));
|
||||
client.Init(FolderPath);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user