public void GetQntContractsTest_enterPriceLessStopPrice_positionLong_EnoughGO_currencyRuble_returned0() { //arrange var enterPrice = 70000; var stopPrice = 80000; var position = PositionSide.Long; var currency = Currency.Ruble; localMoneyManager = new LocalMoneyManager(globalMoneyManager, account, currency); var expected = 0; //act var actual = localMoneyManager.GetQntContracts(enterPrice, stopPrice, position); //assert Assert.AreEqual(expected, actual); }
public void GetQntContractsTest_enterPriceLessStopPrice_positionShort_EnoughGO_currencyUSD_returned0() { //arrange var enterPrice = 1100; var stopPrice = 1200; var position = PositionSide.Short; var currency = Currency.USD; localMoneyManager = new LocalMoneyManager(globalMoneyManager, account, currency); var expected = 10; //act var actual = localMoneyManager.GetQntContracts(enterPrice, stopPrice, position); //assert Assert.AreEqual(expected, actual); }