#EQD-6948 国联民生-实现保证金规则(2)追保金额的产生与收盘计算 收盘计算和授信占用

This commit is contained in:
锦麟 王
2026-08-24 16:34:18 +08:00
parent 8648b62af9
commit c35befbe8f
49 changed files with 2814 additions and 272 deletions
@@ -0,0 +1,21 @@
using YLErp.Modules.MarginModule;
namespace YLErp.Modules.CalcModules
{
/// <summary>
/// 实现方案阶段一 §1.6 测试要点:GetTradeMarginRate 分类判定钩子默认行为回归。
/// 钩子本期默认返回 null → 走"全部/通配行"兜底,取数行为与现状一致(阶段二标签功能不改变取数链路)。
/// 完整 GetTradeMarginRate 依赖 YLContextMySQL),无法纯内存测试,此处覆盖钩子契约。
/// </summary>
[TestClass]
public class MarginTemplateV2RateHelperTest
{
[TestMethod]
public void MT_001_分类判定钩子_默认返回null_走通配兜底()
{
Assert.IsNull(MarginTemplateV2RateHelper.GetUnderlyingCategory("019546.XSHG", null));
Assert.IsNull(MarginTemplateV2RateHelper.GetUnderlyingCategory("200002.XSHE", "Fund"));
Assert.IsNull(MarginTemplateV2RateHelper.GetUnderlyingCategory(null, null));
}
}
}