//using DomainResults.Common; //using Microsoft.Extensions.Logging; //using Core.Enumerations; //using ObjectStorageProvider; //namespace CoreTests.FakeServices { // public class ObjectStorageFakeService : IObjectStorageFileService { // private readonly ILogger _logger; // private Dictionary> _collection; // /// // /// Dictionary // /// // /// // /// Dictionary // public ObjectStorageFakeService( // ILogger logger, // Dictionary> collection // ) { // _logger = logger; // _collection = collection; // } // public (byte[]?, IDomainResult) FileDownload(string bucketName, string objectName) => // FileDownloadAsync(bucketName, objectName).Result; // public Task<(byte[]?, IDomainResult)> FileDownloadAsync(string bucketName, string objectName) => // Task.Run(() => { // Dictionary? bucket; // _collection.TryGetValue(bucketName, out bucket); // if (bucket == null) // return IDomainResult.Failed(); // byte[]? content; // bucket.TryGetValue(objectName, out content); // if (content == null) // return IDomainResult.Failed(); // return IDomainResult.Success(content); // }); // public (string?, IDomainResult) FileUpload(string bucketName, byte[] bytes, string contentType, string location = "us-east-1", bool force = false) { // throw new NotImplementedException(); // } // public (string?, IDomainResult) FileUpload(string bucketName, byte[] bytes, FileExtension fileExtension, string location = "us-east-1", bool force = false) => // FileUploadAsync(bucketName, bytes, fileExtension, location, force).Result; // public Task<(string?, IDomainResult)> FileUploadAsync(string bucketName, byte[] bytes, string contentType, string location = "us-east-1", bool force = false) { // throw new NotImplementedException(); // } // public Task<(string?, IDomainResult)> FileUploadAsync(string bucketName, byte[] bytes, FileExtension fileExtension, string location = "us-east-1", bool force = false) => // Task.Run(() => { // var objName = $"{Guid.NewGuid()}{fileExtension.Id}"; // if (!_collection.ContainsKey(bucketName)) // _collection.Add(bucketName, new Dictionary()); // _collection[bucketName].Add(objName, bytes); // return IDomainResult.Success(objName); // }); // } //}