27 lines
829 B
C#
27 lines
829 B
C#
namespace YLErp.Modules.IntradayModule
|
|
{
|
|
[TestClass]
|
|
public class TestIntradayPositionApiService
|
|
{
|
|
[TestMethod]
|
|
public void TestGetIntradayPositions()
|
|
{
|
|
//当前交易日期
|
|
var valueDate = BLL.valuedateBLL.ValueDate;
|
|
var startDate = valueDate;
|
|
|
|
|
|
var context = new IntradaySettleInfoQueryContext(OptUserInfo.SystemUser);
|
|
|
|
var clientIdsOfInside = context.GetClientIdsOfInside();
|
|
|
|
var clientIdsOfNoInside = context.GetClientIds().Where(a => !clientIdsOfInside.Contains(a)).ToList();
|
|
|
|
//持仓记录
|
|
var positionResult = new IntradayPositionApiService(context).GetIntradayPositions(valueDate, clientIdsOfInside);
|
|
|
|
Assert.IsTrue(positionResult.OptionPositions.Any());
|
|
}
|
|
}
|
|
}
|