Exemplo n.º 1
0
 public void Initialize()
 {
     _config       = new TrackChangesConfig();
     _instance     = new TrackChangesPlugin(_config);
     _rootVNode    = new VNode();
     _currentVNode = new VNode();
     _elemState    = Substitute.For <IElementProcessingState>();
     _elemState.Index.Returns(10);
     _elemState.RootVNode.Returns(_rootVNode);
     _elemState.CurrentVNode.Returns(_currentVNode);
     _elemState
     .When(x => { x.CurrentVNode = Arg.Any <VNode>(); })
     .Do(x => _currentVNode = x.Arg <VNode>());
 }
Exemplo n.º 2
0
 public void Initialize()
 {
     _config = new TextProcessorConfig()
     {
         ParagraphCls = "pcls",
         HyperLinkCls = "hcls",
         RunCls       = "rcls"
     };
     _instance     = new TextProcessorPlugin(_config);
     _state        = Substitute.For <IProcessingState>();
     _elementState = Substitute.For <IElementProcessingState>();
     _elementState.CurrentVNode.Returns(new VNode("div"));
     _elementState
     .When(x => x.CurrentVNode = Arg.Any <VNode>())
     .Do(x => _currentNode     = x.Arg <VNode>());
 }
Exemplo n.º 3
0
 public void Initialize()
 {
     _wpDoc        = EmptyDocuments.GenerateDocument();
     _instance     = new TablePlugin(_wpDoc);
     _tableContext = null;
     _elemState    = Substitute.For <IElementProcessingState>();
     _elemState.Index.Returns(10);
     _elemState
     .When(x => x.SetContext(Arg.Any <TableContext>()))
     .Do(x => _tableContext = x.Args()[0] as TableContext);
     _elemState
     .GetContext(out TableContext _)
     .Returns(x =>
     {
         x[0] = _tableContext;
         return(_tableContext != null);
     });
 }