docker files fixes from liaqat

This commit is contained in:
alirehmani
2024-05-03 16:39:25 +05:00
commit 464a8730e8
587 changed files with 44288 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
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<IMoneyManagementService> _moneyManagementService;
public readonly Mock<IAccountService> _accountService;
public readonly IExchangeService _exchangeService;
public readonly Mock<ITradingService> _tradingService;
public readonly Account Account;
public readonly MoneyManagement MoneyManagement;
public const string PublicAddress = "0x0425dEAb364E9121F7CA284129dA854FD5cF22eD";
public const string PrivateKey = "";
public BaseTests()
{
_accountService = new Mock<IAccountService>();
_moneyManagementService = new Mock<IMoneyManagementService>();
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<string>())).Returns(Task.FromResult(MoneyManagement));
Account = new Account()
{
Exchange = TradingExchanges.Evm,
Key = PublicAddress,
Secret = PrivateKey,
};
_accountService.Setup(a => a.GetAccount(It.IsAny<string>(), It.IsAny<bool>(), It.IsAny<bool>()))
.Returns(Task.FromResult(Account));
_tradingService = new Mock<ITradingService>();
_exchangeService = TradingBaseTests.GetExchangeService();
}
}