using Managing.Application.Abstractions.Services; using Managing.Application.Abstractions; using Moq; using Managing.Domain.MoneyManagements; using static Managing.Common.Enums; using Managing.Domain.Accounts; namespace Managing.Application.Tests; public class BaseTests { public readonly Mock _moneyManagementService; public readonly Mock _accountService; public readonly IExchangeService _exchangeService; public readonly Mock _tradingService; public readonly Account Account; public readonly MoneyManagement MoneyManagement; public const string PublicAddress = "0x0425dEAb364E9121F7CA284129dA854FD5cF22eD"; public const string PrivateKey = ""; public BaseTests() { _accountService = new Mock(); _moneyManagementService = new Mock(); MoneyManagement = new MoneyManagement() { BalanceAtRisk = 0.30m, Leverage = 2, Timeframe = Timeframe.FifteenMinutes, StopLoss = 0.008m, TakeProfit = 0.02m, Name = "Default MM" }; _ =_moneyManagementService.Setup(m => m.GetMoneyMangement(It.IsAny())).Returns(Task.FromResult(MoneyManagement)); Account = new Account() { Exchange = TradingExchanges.Evm, Key = PublicAddress, Secret = PrivateKey, }; _accountService.Setup(a => a.GetAccount(It.IsAny(), It.IsAny(), It.IsAny())) .Returns(Task.FromResult(Account)); _tradingService = new Mock(); _exchangeService = TradingBaseTests.GetExchangeService(); } }