Files
zszq-trs/YLErpUnitTest/Modules/TradeModule/OrderModule/TradeAbstractServiceTest.cs
T
2024-05-09 14:06:26 +08:00

45 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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);
}
}
}
}