从山证v2.3.0拷贝

This commit is contained in:
吴方海
2024-05-09 14:06:26 +08:00
parent 566ff33259
commit f9d8a256a6
4471 changed files with 1203456 additions and 9 deletions
@@ -0,0 +1,44 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using YLErp.DBModels;
namespace YLErp.Modules.TradeModule.OrderModule
{
[TestClass]
public class TradeAbstractServiceTest
{
[TestMethod]
public void TestGetTradeAbstractInfo()
{
var td = new trade
{
TradeType = "香草期权",
UnderlyingCode = "RB2009",
IsUsePremiumRate = true,
Strike = 1.1,
TradeAmount = 100,
ExerciseMode = "American",
TradeNumber = "Test-001",
TradeDate = new DateTime(2020, 1, 12),
ExerciseDate = new DateTime(2020, 3, 1),
ClientName = "福建龙岩可乐公司",
BuySell = "买入",
SpotPrice = 3350,
PremiumRate = 0.23,
TradeSinglePrice = 356,
TradePrice = 199999,
StockEqvNotional = 256789012,
StockEqvNotionalReal = 256789012,
ParticipationRate = 0.9,
IsMoneynessOption = "是"
};
var items = TradeAbstractService.GetTradeAbstractInfoItems(td);
foreach (var item in items)
{
System.Diagnostics.Debug.WriteLine(item.text + "" + item.value);
}
}
}
}