refactor(swap): 合并多空名义本金参数为单一 posiTotalNotional 并加固测试
- DealInterests 的 posiLongNotionalValue + posiShortNotionalValue 合并为 posiTotalNotional(调用点以 posiLongNotional+posiShortNotional 求和传入),净减一个参数 - SwapDealService / SwapEodPositionService / InterestCalcRequest 同步收敛多空死管道参数 - 19 个测试调用点适配新签名 - SwapEodPositionServiceIntegrationTest 参数计数断言由裸数字改为参数名集合断言(CollectionAssert.AreEquivalent,对增删/重排/改名敏感)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using YLErp.DBModels.Enums;
|
||||
|
||||
@@ -272,7 +273,16 @@ namespace YLErp.Modules.SwapModule
|
||||
Console.WriteLine($" ✓ {scenario.Scenario}");
|
||||
}
|
||||
|
||||
Assert.AreEqual(13, parameters.Length, "DealInterests应有13个参数");
|
||||
// 校验参数集合(按名称,对参数增删/重排/改名均敏感,比裸数字更稳)
|
||||
var expectedParamNames = new[]
|
||||
{
|
||||
"interestList", "eodPositions", "todyEodPositions", "settleDate",
|
||||
"td", "flowEvents", "autoInterests", "lastEodSwap",
|
||||
"posiTotalNotional", "closeNational", "grossPrice", "orginPv"
|
||||
};
|
||||
var actualParamNames = parameters.Select(p => p.Name).ToArray();
|
||||
CollectionAssert.AreEquivalent(expectedParamNames, actualParamNames,
|
||||
"DealInterests 参数集合应与预期一致(新增/重排/改名参数时请同步更新此列表)");
|
||||
Console.WriteLine("✅ 分支覆盖分析完成");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user