public void Constructor_NullExcelFileFactoryPassed_Throws() { IExcelRecordReader nullReader = null; var stubMapper = Substitute.For <IRecordToRawArticleMapper>(); var exception = Assert.Catch <ArgumentNullException>( () => new ExcelRawArticleProvider(stubMapper, nullReader)); }
public ErrorHandlerExcelRecordReaderDecorator(IExcelRecordReader decoratedReader) { if (decoratedReader == null) { throw new ArgumentNullException(nameof(decoratedReader)); } this.decoratedReader = decoratedReader; }
public ExcelRawArticleProvider( IRecordToRawArticleMapper recordToRawArticleMapper, IExcelRecordReader recordReader) { if (recordToRawArticleMapper == null) { throw new ArgumentNullException(nameof(recordToRawArticleMapper)); } if (recordReader == null) { throw new ArgumentNullException(nameof(recordReader)); } this.recordToRawArticleMapper = recordToRawArticleMapper; this.recordReader = recordReader; }