Speed up the tests and add stdIn test
MODIFY
WalletWasabi.Tests/UnitTests/Hwi/DefaultResponseTests.cs
WalletWasabi.Tests/UnitTests/Hwi/DefaultResponseTests.cs
@@ -123,11 +123,13 @@ namespace WalletWasabi.Tests.UnitTests.Hwi
HwiProcessBridge pb = new HwiProcessBridge();
using var cts = new CancellationTokenSource(ReasonableRequestTimeout);
- var res = await pb.SendCommandAsync("enumerate", false, cts.Token);
+ var res = await pb.SendCommandAsync("version", false, cts.Token);
Assert.NotEmpty(res.response);
- res = await pb.SendCommandAsync("enumerate", true, cts.Token);
- Assert.Contains("success", res.response);
+ bool stdInputActionCalled = false;
+ res = await pb.SendCommandAsync("version", false, cts.Token, (sw) => stdInputActionCalled = true);
+ Assert.NotEmpty(res.response);
+ Assert.True(stdInputActionCalled);
}
[Fact]
@@ -138,8 +140,8 @@ namespace WalletWasabi.Tests.UnitTests.Hwi
using var cts = new CancellationTokenSource(ReasonableRequestTimeout);
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
- var res = await pb.SendCommandAsync("enumerate", true, cts.Token);
- Assert.NotEmpty(res.response);
+ var res = await pb.SendCommandAsync("version", true, cts.Token);
+ Assert.Contains("success", res.response);
}
else
{

Speed up the tests and add stdIn test