Ejemplo 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));
 }
Ejemplo 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));
 }
Ejemplo 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));
        }
Ejemplo 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>());
 }
Ejemplo 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>());
        }