using System.Security.Cryptography; using FrostFS.SDK.ClientV2.Interfaces; using FrostFS.SDK.Cryptography; using Microsoft.Extensions.Options; namespace FrostFS.SDK.Tests; public abstract class SessionTestsBase { internal readonly string key = "KwHDAJ66o8FoLBjVbjP2sWBmgBMGjt7Vv4boA7xQrBoAYBE397Aq"; protected IOptions Settings { get; set; } protected ECDsa ECDsaKey { get; set; } protected FrostFsOwner OwnerId { get; set; } protected SessionMocker Mocker { get; set; } protected SessionTestsBase() { Settings = Options.Create(new SingleOwnerClientSettings { Key = key, Host = "http://localhost:8080" }); ECDsaKey = key.LoadWif(); OwnerId = FrostFsOwner.FromKey(ECDsaKey); Mocker = new SessionMocker(this.key) { PlacementPolicy = new FrostFsPlacementPolicy(true, new FrostFsReplica(1)), Version = new FrostFsVersion(2, 13) }; } protected IFrostFSClient GetClient() { return ClientV2.FrostFSClient.GetTestInstance( Settings, null, new NetworkMocker(this.key).GetMock().Object, Mocker.GetMock().Object, new ContainerMocker(this.key).GetMock().Object, new ObjectMocker(this.key).GetMock().Object); } }