Remove pragma warning and use discard
MODIFY
WalletWasabi.Tests/RegressionTests/BackendTests.cs
WalletWasabi.Tests/RegressionTests/BackendTests.cs
@@ -29,8 +29,6 @@ namespace WalletWasabi.Tests.RegressionTests
[Collection("RegTest collection")]
public class BackendTests
{
-#pragma warning disable IDE0059 // Value assigned to symbol is never used
-
public BackendTests(RegTestFixture regTestFixture)
{
RegTestFixture = regTestFixture;
@@ -67,7 +65,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task BroadcastReplayTxAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (_, IRPCClient rpc, _, _, _, _, _) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
var utxos = await rpc.ListUnspentAsync();
var utxo = utxos[0];
@@ -87,7 +85,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task BroadcastInvalidTxAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
var content = new StringContent($"''", Encoding.UTF8, "application/json");
@@ -105,7 +103,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task FilterBuilderTestAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (_, IRPCClient rpc, _, _, _, _, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
var indexBuilderServiceDir = Tests.Common.GetWorkDir();
var indexFilePath = Path.Combine(indexBuilderServiceDir, $"Index{rpc.Network}.dat");
@@ -174,7 +172,7 @@ namespace WalletWasabi.Tests.RegressionTests
public async Task StatusRequestTestAsync()
{
string request = $"/api/v{WasabiClient.ApiVersion}/btc/Blockchain/status";
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (_, IRPCClient rpc, _, _, _, _, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
var indexBuilderService = global.IndexBuilderService;
try
@@ -239,7 +237,5 @@ namespace WalletWasabi.Tests.RegressionTests
}
#endregion BackendTests
-
-#pragma warning restore IDE0059 // Value assigned to symbol is never used
}
}

MODIFY
WalletWasabi.Tests/RegressionTests/BuildTests.cs
WalletWasabi.Tests/RegressionTests/BuildTests.cs
@@ -29,8 +29,6 @@ namespace WalletWasabi.Tests.RegressionTests
[Collection("RegTest collection")]
public class BuildTests
{
-#pragma warning disable IDE0059 // Value assigned to symbol is never used
-
public BuildTests(RegTestFixture regTestFixture)
{
RegTestFixture = regTestFixture;
@@ -41,7 +39,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task BuildTransactionValidationsTestAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (string password, IRPCClient rpc, Network network, _, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
// Create the services.
// 1. Create connection service.
@@ -204,7 +202,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task BuildTransactionReorgsTestAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (string password, IRPCClient rpc, Network network, _, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
bitcoinStore.IndexStore.NewFilter += Common.Wallet_NewFilterProcessed;
// Create the services.
// 1. Create connection service.
@@ -416,7 +414,5 @@ namespace WalletWasabi.Tests.RegressionTests
node?.Disconnect();
}
}
-
-#pragma warning restore IDE0059 // Value assigned to symbol is never used
}
}

MODIFY
WalletWasabi.Tests/RegressionTests/CoinJoinTests.cs
WalletWasabi.Tests/RegressionTests/CoinJoinTests.cs
@@ -39,8 +39,6 @@ namespace WalletWasabi.Tests.RegressionTests
[Collection("RegTest collection")]
public class CoinJoinTests
{
-#pragma warning disable IDE0059 // Value assigned to symbol is never used
-
public CoinJoinTests(RegTestFixture regTestFixture)
{
RegTestFixture = regTestFixture;
@@ -53,7 +51,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task CoordinatorCtorTestsAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (_, IRPCClient rpc, Network network, Coordinator coordinator, _, _, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
Logger.TurnOff(); // turn off at the end, otherwise, the tests logs would have of warnings
@@ -96,7 +94,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task CcjTestsAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (_, IRPCClient rpc, Network network, Coordinator coordinator, _, _, _) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
Money denomination = Money.Coins(0.2m);
decimal coordinatorFeePercent = 0.2m;
@@ -695,7 +693,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task CcjEqualInputTestsAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (_, IRPCClient rpc, Network network, Coordinator coordinator, _, _, _) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
Money denomination = Money.Coins(0.1m);
decimal coordinatorFeePercent = 0.0002m;
@@ -846,7 +844,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task Ccj100ParticipantsTestsAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (_, IRPCClient rpc, Network network, Coordinator coordinator, _, _, _) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
Money denomination = Money.Coins(0.1m);
decimal coordinatorFeePercent = 0.003m;
@@ -1069,7 +1067,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task CcjFeeTestsAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (string password, IRPCClient rpc, Network network, Coordinator coordinator, _, BitcoinStore bitcoinStore, _) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
var synchronizer = new WasabiSynchronizer(network, bitcoinStore, new Uri(RegTestFixture.BackendEndPoint), null);
synchronizer.Start(requestInterval: TimeSpan.FromSeconds(3), TimeSpan.FromSeconds(5), 10000); // Start wasabi synchronizer service.
@@ -1172,7 +1170,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task CoinJoinClientTestsAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (string password, IRPCClient rpc, Network network, Coordinator coordinator, _, BitcoinStore bitcoinStore, _) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
var synchronizer = new WasabiSynchronizer(network, bitcoinStore, new Uri(RegTestFixture.BackendEndPoint), null);
synchronizer.Start(requestInterval: TimeSpan.FromSeconds(3), TimeSpan.FromSeconds(5), 10000); // Start wasabi synchronizer service.
@@ -1514,8 +1512,6 @@ namespace WalletWasabi.Tests.RegressionTests
}
}
-#pragma warning restore IDE0059 // Value assigned to symbol is never used
-
private async Task<AliceClient4> CreateNewAliceClientAsync(
long roundId,
IEnumerable<BitcoinAddress> registeredAddresses,

MODIFY
WalletWasabi.Tests/RegressionTests/Common.cs
WalletWasabi.Tests/RegressionTests/Common.cs
using NBitcoin;
using System;
+using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
@@ -40,10 +41,8 @@ namespace WalletWasabi.Tests.RegressionTests
}
}
-#pragma warning disable IDE0060 // Remove unused parameter
-
+ [SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Must match delegate")]
public static void Wallet_NewFilterProcessed(object sender, FilterModel e)
-#pragma warning restore IDE0060 // Remove unused parameter
{
Interlocked.Increment(ref FiltersProcessedByWalletCount);
}

MODIFY
WalletWasabi.Tests/RegressionTests/DosTests.cs
WalletWasabi.Tests/RegressionTests/DosTests.cs
@@ -22,8 +22,6 @@ namespace WalletWasabi.Tests.RegressionTests
[Collection("RegTest collection")]
public class DosTests
{
-#pragma warning disable IDE0059 // Value assigned to symbol is never used
-
public DosTests(RegTestFixture regTestFixture)
{
RegTestFixture = regTestFixture;
@@ -49,7 +47,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task BanningTestsAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (_, IRPCClient rpc, Network network, Coordinator coordinator, _, _, _) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
Money denomination = Money.Coins(0.1m);
decimal coordinatorFeePercent = 0.1m;
@@ -253,7 +251,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task NotingTestsAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (_, IRPCClient rpc, Network network, Coordinator coordinator, _, _, _) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
Money denomination = Money.Coins(1m);
decimal coordinatorFeePercent = 0.1m;
@@ -315,7 +313,5 @@ namespace WalletWasabi.Tests.RegressionTests
notedCount = coordinator.UtxoReferee.CountBanned(true);
Assert.Equal(anonymitySet, notedCount);
}
-
-#pragma warning restore IDE0059 // Value assigned to symbol is never used
}
}

MODIFY
WalletWasabi.Tests/RegressionTests/SendTests.cs
WalletWasabi.Tests/RegressionTests/SendTests.cs
@@ -26,8 +26,6 @@ namespace WalletWasabi.Tests.RegressionTests
[Collection("RegTest collection")]
public class SendTests
{
-#pragma warning disable IDE0059 // Value assigned to symbol is never used
-
public SendTests(RegTestFixture regTestFixture)
{
RegTestFixture = regTestFixture;
@@ -38,7 +36,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task SendTestsAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (string password, IRPCClient rpc, Network network, _, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
bitcoinStore.IndexStore.NewFilter += Common.Wallet_NewFilterProcessed;
// Create the services.
// 1. Create connection service.
@@ -517,7 +515,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task SpendUnconfirmedTxTestAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (string password, IRPCClient rpc, Network network, _, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
bitcoinStore.IndexStore.NewFilter += Common.Wallet_NewFilterProcessed;
// Create the services.
// 1. Create connection service.
@@ -690,7 +688,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task ReplaceByFeeTxTestAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (string password, IRPCClient rpc, Network network, _, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
// Create the services.
// 1. Create connection service.
@@ -786,7 +784,5 @@ namespace WalletWasabi.Tests.RegressionTests
node?.Disconnect();
}
}
-
-#pragma warning restore IDE0059 // Value assigned to symbol is never used
}
}

MODIFY
WalletWasabi.Tests/RegressionTests/WalletTests.cs
WalletWasabi.Tests/RegressionTests/WalletTests.cs
@@ -24,8 +24,6 @@ namespace WalletWasabi.Tests.RegressionTests
[Collection("RegTest collection")]
public class WalletTests
{
-#pragma warning disable IDE0059 // Value assigned to symbol is never used
-
public WalletTests(RegTestFixture regTestFixture)
{
RegTestFixture = regTestFixture;
@@ -52,7 +50,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task FilterDownloaderTestAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (_, IRPCClient rpc, _, _, _, BitcoinStore bitcoinStore, _) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
var synchronizer = new WasabiSynchronizer(rpc.Network, bitcoinStore, new Uri(RegTestFixture.BackendEndPoint), null);
try
@@ -121,7 +119,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task ReorgTestAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (string password, IRPCClient rpc, Network network, _, _, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
var keyManager = KeyManager.CreateNew(out _, password);
@@ -232,7 +230,7 @@ namespace WalletWasabi.Tests.RegressionTests
[Fact]
public async Task WalletTestsAsync()
{
- (string password, IRPCClient rpc, Network network, Coordinator coordinator, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
+ (string password, IRPCClient rpc, Network network, _, ServiceConfiguration serviceConfiguration, BitcoinStore bitcoinStore, Backend.Global global) = await Common.InitializeTestEnvironmentAsync(RegTestFixture, 1);
// Create the services.
// 1. Create connection service.
@@ -423,7 +421,5 @@ namespace WalletWasabi.Tests.RegressionTests
node?.Disconnect();
}
}
-
-#pragma warning restore IDE0059 // Value assigned to symbol is never used
}
}

Remove pragma warning and use discard