Closed GoogleCodeExporter closed 8 years ago
Interesting...
Searching in the TestFindFile's sample directory:
File.WriteAllText(Path.Combine(TestFolder, "a.1"), "a");
File.WriteAllText(Path.Combine(TestFolder, "b.2"), "b");
File.WriteAllText(Path.Combine(TestFolder, "c.3"), "c");
Directory.CreateDirectory(Path.Combine(TestFolder, "child1"));
File.WriteAllText(Path.Combine(TestFolder, @"child1\a.1"), "a");
File.WriteAllText(Path.Combine(TestFolder, @"child1\b.2"), "b");
File.WriteAllText(Path.Combine(TestFolder, @"child1\c.3"), "c");
Directory.CreateDirectory(Path.Combine(TestFolder, @"child1\child2"));
I tried to replicate this result with the following unit test:
[Test]
public void TestFilesByExtension()
{
int files = 0;
string dir = TestFolder;
var ff = new FindFile(dir, "*.2", true, true, true);
ff.FileFound += (sender, args) => { files++; };
ff.Find();
Assert.AreEqual(2, files);
}
This test is passing. I'm not sure how to replicate the failure you
experienced. Can you help me build a unit test that exhibits the behavior you
are describing?
Original comment by Grig...@gmail.com
on 26 Jan 2014 at 7:17
Original issue reported on code.google.com by
simon.he...@simmotech.co.uk
on 10 Feb 2013 at 1:06