Tester the worker app channel

This commit is contained in:
Ben Olden-Cooligan 2022-06-19 18:40:16 -07:00
parent 3eda15242a
commit 4d9a885700

View File

@ -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
{