Exemplo n.º 1
0
        public void TestReset()
        {
            Dictionary dictionary = new TemplateDictionary();
            Group      template   = new MessageTemplate("Position",
                                                        new Field[] {
                new Scalar("exchange", FASTType.STRING, Operator.COPY, ScalarValue.UNDEFINED, false)
            });
            ScalarValue value = new StringValue("NYSE");

            dictionary.Store(template, FastConstants.ANY_TYPE, new QName("exchange"), value);

            Assert.AreEqual(value, dictionary.Lookup(template, new QName("exchange"), FastConstants.ANY_TYPE));
            dictionary.Reset();
            Assert.AreEqual(ScalarValue.UNDEFINED,
                            dictionary.Lookup(template, new QName("exchange"), FastConstants.ANY_TYPE));
        }
Exemplo n.º 2
0
        public void TestReset()
        {
            IDictionary dictionary = new TemplateDictionary();
            Group       template   = new MessageTemplate(
                "Position",
                new Field[]
            {
                new Scalar("exchange", FastType.String, Operator.Copy, ScalarValue.Undefined, false)
            });
            ScalarValue value = new StringValue("NYSE");

            dictionary.Store(template, new QName("exchange"), FastConstants.AnyType, value);

            Assert.AreEqual(value, dictionary.Lookup(template, new QName("exchange"), FastConstants.AnyType));
            dictionary.Reset();
            Assert.AreEqual(ScalarValue.Undefined,
                            dictionary.Lookup(template, new QName("exchange"), FastConstants.AnyType));
        }
        public void TestReset()
        {
            IDictionary dictionary = new TemplateDictionary();
            Group template = new MessageTemplate(
                "Position",
                new Field[]
                    {
                        new Scalar("exchange", FastType.String, Operator.Copy, ScalarValue.Undefined, false)
                    });
            ScalarValue value = new StringValue("NYSE");
            dictionary.Store(template, new QName("exchange"), FastConstants.AnyType, value);

            Assert.AreEqual(value, dictionary.Lookup(template, new QName("exchange"), FastConstants.AnyType));
            dictionary.Reset();
            Assert.AreEqual(ScalarValue.Undefined,
                            dictionary.Lookup(template, new QName("exchange"), FastConstants.AnyType));
        }