public void WhenHaveNoExclusionsAndCheckIsExcludedThenShouldReturnFalse() { this.processor = new ExclusionsProcessor(""); Assert.False(this.processor.IsExcluded("SomeFile.cs")); Assert.False(this.processor.IsExcluded("SomeDir/SomeFile.cs")); Assert.False(this.processor.IsExcluded("somedir.xml/SomeOtherCompletelyDifferentFile.cpp")); }
private static int RunDailyCodeChurn(DailyCodeChurnCommandLineArgs a) { var fileSystem = new FileSystem(); var jsonParser = new JsonListParser <DailyCodeChurn>(new FileStreamFactory()); var logger = new ConsoleLoggerWithTimestamp(); var exclusionsProcessor = new ExclusionsProcessor(a.Exclusions); var inclusionsProcessor = new InclusionsProcessor(a.Inclusions); var jsonExporter = new JsonExporter(new FileStreamFactory()); var processor = new DailyCodeChurnProcessor(fileSystem, jsonParser, logger, exclusionsProcessor, inclusionsProcessor, jsonExporter); processor.Process(a); return(0); }
public GivenAnExclusionsProcessor() { this.processor = new ExclusionsProcessor("external/**,Tools/Libraries/**,**/*.xml,**/SomeSpecificFile.h,SomeDir/OtherDir/SomeFile.*,**/*.tests.cpp,**/Mock*.*,**/*Tests.cpp,dir?/file.txt"); }