Add CoreNode unit test.
MODIFY
WalletWasabi.Tests/NodeBuilding/CoreNode.cs
WalletWasabi.Tests/NodeBuilding/CoreNode.cs
@@ -25,7 +25,7 @@ namespace WalletWasabi.Tests.NodeBuilding
public EndPoint RpcEndPoint { get; private set; }
public RPCClient RpcClient { get; private set; }
- private Process Process { get; set; }
+ public Process Process { get; private set; }
private string DataDir { get; set; }
public static async Task<CoreNode> CreateAsync([CallerMemberName]string caller = null)
@@ -169,7 +169,7 @@ namespace WalletWasabi.Tests.NodeBuilding
private readonly AsyncLock KillerLock = new AsyncLock();
- public async Task TryKillAsync()
+ public async Task StopAsync()
{
try
{

ADD
WalletWasabi.Tests/UnitTests/BitcoinCore/NodeBuildingTests.cs
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+using WalletWasabi.Tests.NodeBuilding;
+using Xunit;
+
+namespace WalletWasabi.Tests.UnitTests.BitcoinCore
+{
+ public class NodeBuildingTests
+ {
+ [Fact]
+ public async Task CanBuildCoreNodeAsync()
+ {
+ var coreNode = await CoreNode.CreateAsync();
+ try
+ {
+ Assert.False(coreNode.Process.HasExited);
+ }
+ finally
+ {
+ await coreNode.StopAsync();
+ }
+ }
+ }
+}

MODIFY
WalletWasabi.Tests/XunitConfiguration/RegTestFixture.cs
WalletWasabi.Tests/XunitConfiguration/RegTestFixture.cs
@@ -112,7 +112,7 @@ namespace WalletWasabi.Tests.XunitConfiguration
{
BackendHost?.StopAsync().GetAwaiter().GetResult();
BackendHost?.Dispose();
- BackendRegTestNode?.TryKillAsync().GetAwaiter().GetResult();
+ BackendRegTestNode?.StopAsync().GetAwaiter().GetResult();
}
_disposedValue = true;

Add CoreNode unit test.