public void Constructor_ThrowsArgumentNullException_NullTableLoader() { ISalesDataTableLoader loader = null; var path = Fixture.Create <string>(); Assert.Throws <ArgumentNullException>(() => new SalesTableFactory(loader, path)); }
/// <summary> /// Constructs and instance of the <see cref="SalesTableFactory"/> class /// </summary> /// <param name="tableLoader">class used to load table</param> /// <param name="filepath">source file path</param> public SalesTableFactory(ISalesDataTableLoader tableLoader, string filepath) { _filepath = !string.IsNullOrWhiteSpace(filepath) ? filepath : throw new ArgumentNullException(nameof(filepath)); _tableLoader = tableLoader ?? throw new ArgumentNullException(nameof(tableLoader)); }