using YLErp.Modules.MarginModule; namespace YLErp.Modules.CalcModules { /// /// 实现方案阶段一 §1.6 测试要点:GetTradeMarginRate 分类判定钩子默认行为回归。 /// 钩子本期默认返回 null → 走"全部/通配行"兜底,取数行为与现状一致(阶段二标签功能不改变取数链路)。 /// 完整 GetTradeMarginRate 依赖 YLContext(MySQL),无法纯内存测试,此处覆盖钩子契约。 /// [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)); } } }