//using Microsoft.Extensions.Logging;

//using DomainResults.Common;

//using VaultProvider;

//namespace CoreTests.FakeServices {
//  public class VaultFakeService : IVaultService {

//    private readonly ILogger<VaultFakeService> _logger;
//    private Dictionary<string, KeyValuePair<string, object>> _collection;

//    public VaultFakeService(
//      ILogger<VaultFakeService> logger,
//      Dictionary<string, KeyValuePair<string, object>> collection
//    ) {
//      _logger = logger;
//      _collection = collection;
//    }

//    public (Guid?, IDomainResult) IsTokenWhitelisted(string path, string token) =>
//      IsTokenWhitelistedAsync(path, token).Result;

//    public Task<(Guid?, IDomainResult)> IsTokenWhitelistedAsync(string path, string token) =>
//      Task.Run(() => IDomainResult.Success<Guid?>(Guid.NewGuid()));

//    public (string?, IDomainResult) ReadMailboxPassword(string path) =>
//      ReadMailboxPasswordAsync(path).Result;

//    public Task<(string?, IDomainResult)> ReadMailboxPasswordAsync(string path) =>
//      Task.Run(() => {
//        KeyValuePair<string, object> kv;
//        _collection.TryGetValue(path, out kv);

//        if (kv.Value == null)
//          return IDomainResult.Failed<string?>();

//        return IDomainResult.Success((string)kv.Value);
//      });

//    public (Guid?, IDomainResult) WriteMailboxPassword(string path, string email, string password) =>
//      WriteMailboxPasswordAsync(path, email, password).Result;

//    public Task<(Guid?, IDomainResult)> WriteMailboxPasswordAsync(string path, string email, string password) {
//      throw new NotImplementedException();
//    }
//  }
//}
