public void TestLookupMultipleValuesForTemplate() { 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"); ScalarValue marketValue = new DecimalValue(100000.00); dictionary.Store(template, FastConstants.ANY_TYPE, new QName("exchange"), value); dictionary.Store(template, FastConstants.ANY_TYPE, new QName("marketValue"), marketValue); Assert.IsFalse(value.Equals(ScalarValue.UNDEFINED)); Assert.AreEqual(value, dictionary.Lookup(template, new QName("exchange"), FastConstants.ANY_TYPE)); Assert.AreEqual(marketValue, dictionary.Lookup(template, new QName("marketValue"), FastConstants.ANY_TYPE)); }
public void TestExistingTemplateValueLookup() { 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(ScalarValue.UNDEFINED, dictionary.Lookup(template, new QName("bid"), FastConstants.ANY_TYPE)); }