test: add in-process fake ElectrumX server for network-layer testing
Real loopback TCP socket speaking newline-delimited JSON-RPC 2.0, optionally TLS with a self-signed certificate, with per-method handlers and call counters. Lets ElectrumClient, WalletSynchronizer, TransactionInspector, and CertificatePinStore be exercised against the same code paths used in production instead of being mocked. Also exposes UpdateChecker's tag-parsing logic internally so its version comparison can be tested without a real GitHub API call.
This commit is contained in:
@@ -55,7 +55,7 @@ public static class UpdateChecker
|
||||
}
|
||||
|
||||
/// <summary>Parses "v1.2.3" / "1.2.3-beta" style tags into a comparable <see cref="Version"/>.</summary>
|
||||
private static bool TryParse(string raw, out Version version)
|
||||
internal static bool TryParse(string raw, out Version version)
|
||||
{
|
||||
var s = raw.Trim();
|
||||
if (s.StartsWith('v') || s.StartsWith('V')) s = s[1..];
|
||||
|
||||
@@ -6,8 +6,12 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NBitcoin" Version="10.0.6" />
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NBitcoin" Version="10.0.6" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<InternalsVisibleTo Include="PalladiumWallet.Tests" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user