当前位置: 首页>>代码示例>>C#>>正文


C# QuickFix.DataDictionary.DataDictionary.CheckGroupCount方法代码示例

本文整理汇总了C#中QuickFix.DataDictionary.DataDictionary.CheckGroupCount方法的典型用法代码示例。如果您正苦于以下问题:C# QuickFix.DataDictionary.DataDictionary.CheckGroupCount方法的具体用法?C# QuickFix.DataDictionary.DataDictionary.CheckGroupCount怎么用?C# QuickFix.DataDictionary.DataDictionary.CheckGroupCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QuickFix.DataDictionary.DataDictionary的用法示例。


在下文中一共展示了QuickFix.DataDictionary.DataDictionary.CheckGroupCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CheckGroupCountTest

        public void CheckGroupCountTest()
        {
            QuickFix.DataDictionary.DataDictionary dd = new QuickFix.DataDictionary.DataDictionary("../../../spec/fix/FIX42.xml");

            QuickFix.FIX42.NewOrderSingle n = new QuickFix.FIX42.NewOrderSingle();

            string nul = Message.SOH;
            string s = "8=FIX.4.2" + nul + "9=148" + nul + "35=D" + nul + "34=2" + nul + "49=TW" + nul + "52=20111011-15:06:23.103" + nul + "56=ISLD" + nul
                + "11=ID" + nul + "21=1" + nul + "40=1" + nul + "54=1" + nul + "38=200.00" + nul + "55=INTC" + nul
                + "386=3" + nul + "336=PRE-OPEN" + nul + "336=AFTER-HOURS" + nul
                + "60=20111011-15:06:23.103" + nul
                + "10=35" + nul;

            n.FromString(s, true, dd, dd);

            //verify that FromString didn't correct the counter (if these fail, check if MessageTests::FromString_DoNotCorrectCounter() passes)
            Assert.AreEqual("386=3", n.NoTradingSessions.toStringField());
            StringAssert.Contains("386=3", n.ToString());

            Assert.Throws<QuickFix.RepeatingGroupCountMismatch>(delegate { dd.CheckGroupCount(n.NoTradingSessions, n, "D"); });
        }
开发者ID:shanetrotter,项目名称:quickfixn,代码行数:21,代码来源:DataDictionaryTests.cs


注:本文中的QuickFix.DataDictionary.DataDictionary.CheckGroupCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。