Esempio n. 1
0
 private static void ParseCell(string cellContent, string symbolName)
 {
     var cell = new CellTreeLeaf(cellContent);
     var processor = new CellProcessorBase();
     processor.Store(new Symbol(symbolName, "value"));
     new ParseSymbol{Processor = processor}.Parse(typeof (string), TypedValue.Void, cell);
     Assert.AreEqual(" value", cell.Value.GetAttribute(CellAttribute.InformationSuffix));
 }
Esempio n. 2
0
 public void AddsSymbolValueToCellAttributes()
 {
     var cell = new CellTreeLeaf("<<symbol");
     var processor = new CellProcessorBase();
     processor.Store(new Symbol("symbol", "value"));
     new ParseSymbol{Processor = processor}.Parse(typeof (string), TypedValue.Void, cell);
     Assert.AreEqual(" value", cell.Value.GetAttribute(CellAttribute.InformationSuffix));
 }
Esempio n. 3
0
        private static void ParseCell(string cellContent, string symbolName)
        {
            var cell      = new CellTreeLeaf(cellContent);
            var processor = new CellProcessorBase();

            processor.Store(new Symbol(symbolName, "value"));
            new ParseSymbol {
                Processor = processor
            }.Parse(typeof(string), TypedValue.Void, cell);
            Assert.AreEqual(" value", cell.Value.GetAttribute(CellAttribute.InformationSuffix));
        }
Esempio n. 4
0
 public void CachesParsedValue()
 {
     var cell = new CellTreeLeaf("<<symbol");
     var processor = new CellProcessorBase();
     processor.Store(new Symbol("symbol", "value"));
     TypedValue result = processor.Parse(typeof (string), TypedValue.Void, cell);
     Assert.AreEqual("value", result.GetValue<string>());
     Assert.AreEqual(" value", cell.Value.GetAttribute(CellAttribute.InformationSuffix));
     processor.Parse(typeof (string), TypedValue.Void, cell);
     Assert.AreEqual(" value", cell.Value.GetAttribute(CellAttribute.InformationSuffix));
     Assert.AreEqual("value", result.GetValue<string>());
 }
Esempio n. 5
0
        [Test] public void CachesParsedValue()
        {
            var cell      = new CellTreeLeaf("<<symbol");
            var processor = new CellProcessorBase();

            processor.Store(new Symbol("symbol", "value"));
            TypedValue result = processor.Parse(typeof(string), TypedValue.Void, cell);

            Assert.AreEqual("value", result.GetValue <string>());
            Assert.AreEqual(" value", cell.Value.GetAttribute(CellAttribute.InformationSuffix));
            processor.Parse(typeof(string), TypedValue.Void, cell);
            Assert.AreEqual(" value", cell.Value.GetAttribute(CellAttribute.InformationSuffix));
            Assert.AreEqual("value", result.GetValue <string>());
        }