using System.Collections.Generic;
using PolyTrader.Core.Persistence;
using PolyTraderSharp.Models;

namespace PolyTrader.Tests.Fakes
{
    /// <summary>
    /// Minimaler In-Memory-Stub für <see cref="IPositionRepository"/>. Die Leiter-Tests brauchen nur,
    /// dass UpsertLive nicht crasht; die eigentliche Persistenz ist hier irrelevant.
    /// </summary>
    public sealed class FakePositionRepository : IPositionRepository
    {
        public List<(int AccountId, string TokenId)> UpsertedLive { get; } = new();

        public List<Position> GetLive(int accountId) => new();
        public List<Position> GetDemo(int accountId) => new();
        public Position? FindLive(int accountId, string tokenId) => null;
        public Position? FindDemo(int accountId, string tokenId) => null;
        public void UpsertLive(int accountId, Position position) => UpsertedLive.Add((accountId, position.TokenId));
        public void UpsertDemo(int accountId, Position position) { }
        public void DeleteLive(int accountId, string tokenId) { }
        public void DeleteDemo(int accountId, string tokenId) { }
        public void DropDemo(int accountId) { }
    }
}
