private static void FileExtensionTestRunner() { var testCases = new List <string> { "floof", "test.png", "c:\\home\\code\\floof.floof", "c:\\home\\code\\floof.floof.pdf", "c:\\home\\code\\stuff\\asdasfd-sadfsadf-asfasfsd-asfda" }; foreach (var testCase in testCases) { var sw = new Stopwatch(); sw.Start(); var regexResult = new InvalidLocalFileSpecification().IsSatisfiedBy(testCase); sw.Stop(); Console.WriteLine("Test of [{0}] returned {1} in {2} ticks.", testCase, regexResult, sw.ElapsedTicks); } }
private static void FileExtensionTestRunner() { var testCases = new List<string> {"floof", "test.png", "c:\\home\\code\\floof.floof", "c:\\home\\code\\floof.floof.pdf", "c:\\home\\code\\stuff\\asdasfd-sadfsadf-asfasfsd-asfda"}; foreach (var testCase in testCases) { var sw = new Stopwatch(); sw.Start(); var regexResult = new InvalidLocalFileSpecification().IsSatisfiedBy(testCase); sw.Stop(); Console.WriteLine("Test of [{0}] returned {1} in {2} ticks.", testCase, regexResult, sw.ElapsedTicks); } }