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