using Managing.Common;
using Managing.Domain.Trades;
using Managing.Infrastructure.Evm;
using Managing.Infrastructure.Evm.Models.Privy;
using Managing.Infrastructure.Evm.Services;
using Xunit;
using Managing.Infrastructure.Evm.Abstractions;
using Microsoft.Extensions.Options;

namespace Managing.Infrastructure.Tests;

public class PrivyTradingTests : EvmManagerTests
{
    [Fact]
    public async Task Should_return_orders()
    {
        var account = PrivateKeys.GetAccount();
        account.Type = Enums.AccountType.Privy;

        var orders = await _manager.GetOrders(account, Enums.Ticker.BTC);
        Assert.IsType<List<Trade>>(orders);
    }

    [Fact]
    public async void Should_cancel_order()
    {
        var account = PrivateKeys.GetAccount();
        account.Type = Enums.AccountType.Privy;


        var result = await _manager.CancelOrders(account, Enums.Ticker.BTC);
        Assert.True(result);
    }
}