using Speckle.Core.Transports; namespace Speckle.Core.Serialization.Tests; public class TestTransport : ITransport { public IDictionary Objects { get; } public TestTransport(IDictionary objects) { Objects = objects; } public string TransportName { get => "Test"; set { } } public Dictionary TransportContext { get; } public TimeSpan Elapsed { get; } public int SavedObjectCount { get; } public CancellationToken CancellationToken { get; set; } public Action? OnProgressAction { get; set; } public Action? OnErrorAction { get; set; } public void BeginWrite() => throw new NotImplementedException(); public void EndWrite() => throw new NotImplementedException(); public void SaveObject(string id, string serializedObject) => Objects[id] = serializedObject; public void SaveObject(string id, ITransport sourceTransport) => throw new NotImplementedException(); public Task WriteComplete() => throw new NotImplementedException(); public string? GetObject(string id) => Objects.TryGetValue(id, out string? o) ? o : null; public Task CopyObjectAndChildren( string id, ITransport targetTransport, Action? onTotalChildrenCountKnown = null ) => throw new NotImplementedException(); public Task> HasObjects(IReadOnlyList objectIds) => throw new NotImplementedException(); }