refactor(swap): 合并多空名义本金参数为单一 posiTotalNotional 并加固测试
- DealInterests 的 posiLongNotionalValue + posiShortNotionalValue 合并为 posiTotalNotional(调用点以 posiLongNotional+posiShortNotional 求和传入),净减一个参数 - SwapDealService / SwapEodPositionService / InterestCalcRequest 同步收敛多空死管道参数 - 19 个测试调用点适配新签名 - SwapEodPositionServiceIntegrationTest 参数计数断言由裸数字改为参数名集合断言(CollectionAssert.AreEquivalent,对增删/重排/改名敏感)
This commit is contained in:
@@ -121,7 +121,7 @@ namespace YLErp.Modules.SwapModule
|
||||
var position = MakePosition(currentNotional);
|
||||
var interests = _svc.GetInterests(td, td.trade_extend, UnwindDate, UnwindDate,
|
||||
MakeLastEod(), new List<swap_position> { position },
|
||||
currentNotional, currentNotional, currentNotional, currentNotional * closePercent, closePercent,
|
||||
currentNotional, currentNotional * closePercent, closePercent,
|
||||
(int)SwapEventTypeEnum.平仓,
|
||||
false, N, false, settment: false, newCalcLast: false, closeList: null);
|
||||
Assert.AreEqual(1, interests.Count, "标的期初全价腿应生成 1 条 flow_event");
|
||||
|
||||
Reference in New Issue
Block a user