Rename testRefactor test constructor
RENAME
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/UtxoWhitelistTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/WhitelistTests.cs
+using System.Linq;
using System.Threading.Tasks;
using WalletWasabi.Tests.Helpers;
+using WalletWasabi.WabiSabi.Backend;
using WalletWasabi.WabiSabi.Backend.Banning;
using Xunit;
namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend;
-public class UtxoWhitelistTests
+public class WhitelistTests
{
[Fact]
public async Task WhitelistChangeTrafficAsync()
{
- var whitelist = new Whitelist();
+ Whitelist whitelist = new(Enumerable.Empty<Innocent>(), string.Empty, new WabiSabiConfig() { ReleaseFromWhitelistAfter = TimeSpan.FromSeconds(1) });
var currentChangeId = whitelist.ChangeId;
var outpoint = BitcoinFactory.CreateOutPoint();

MODIFY
WalletWasabi/WabiSabi/Backend/Banning/CoinVerifier.cs
WalletWasabi/WabiSabi/Backend/Banning/CoinVerifier.cs
@@ -21,12 +21,12 @@ public class CoinVerifier
WabiSabiConfig = wabiSabiConfig;
}
- // Blank constructor used for testing
+ // Constructor used for testing
internal CoinVerifier(CoinJoinIdStore coinJoinIdStore, CoinVerifierApiClient apiClient, WabiSabiConfig wabiSabiConfig)
{
CoinJoinIdStore = coinJoinIdStore;
CoinVerifierApiClient = apiClient;
- Whitelist = new();
+ Whitelist = new(Enumerable.Empty<Innocent>(), string.Empty, new WabiSabiConfig() { ReleaseFromWhitelistAfter = TimeSpan.FromSeconds(1) });
WabiSabiConfig = wabiSabiConfig;
}

MODIFY
WalletWasabi/WabiSabi/Backend/Banning/Whitelist.cs
WalletWasabi/WabiSabi/Backend/Banning/Whitelist.cs
@@ -18,15 +18,8 @@ namespace WalletWasabi.WabiSabi.Backend.Banning;
/// </summary>
public class Whitelist
{
- // Used only in tests.
- internal Whitelist() : this(
- Enumerable.Empty<Innocent>(),
- string.Empty,
- new WabiSabiConfig() { ReleaseFromWhitelistAfter = TimeSpan.FromSeconds(1) })
- {
- }
-
- private Whitelist(IEnumerable<Innocent> innocents, string filePath, WabiSabiConfig wabiSabiConfig)
+ // Constructor used for testing.
+ internal Whitelist(IEnumerable<Innocent> innocents, string filePath, WabiSabiConfig wabiSabiConfig)
{
Innocents = new ConcurrentDictionary<OutPoint, Innocent>(innocents.ToDictionary(k => k.Outpoint, v => v));
if (!string.IsNullOrEmpty(filePath))

Rename testRefactor test constructor