public void WhenFilesInfoProviderIsNull_Should_ThrowArgumentNullException() { IFilesInfoProvider nullProvider = null; Action act = () => { ICvFileInfoProvider cvFileInfoProvider = new CvFileInfoProvider(nullProvider); }; act.Should().ThrowExactly <ArgumentNullException>(); }
public CvFileInfoProviderTests() { this.filesInfoProvider = Substitute.For <IFilesInfoProvider>(); ICvNameMatcher alwaysTrueCvNameMatcher = Substitute.For <ICvNameMatcher>(); alwaysTrueCvNameMatcher.IsMatch(Arg.Any <string>(), Arg.Any <string>()).Returns(true); CvExtensions.CvNameMatcher = alwaysTrueCvNameMatcher; this.cvFileInfoProvider = new CvFileInfoProvider(filesInfoProvider); }
public CvFileInfoProvider(IFilesInfoProvider filesInfoProvider) { this.filesInfoProvider = filesInfoProvider ?? throw new ArgumentNullException(nameof(filesInfoProvider)); }