从山证v2.3.0拷贝
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user