Files
zszq-trs/UnitTestProject/Modules/CalcModules/MarginTemplateV2RateHelperTest.cs

22 lines
974 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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));
}
}
}