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); }); }
public void TablePlugin2_NoStyleTest() { _wpDoc = EmptyDocuments.GenerateDocumentWithoutStyle(); _instance = new TablePlugin(_wpDoc); AssertGridFactoryLegit(); }