public void FileSystemDelete()
{
var fileSystem = new FileSystem(@"c:\temp\");
int[] threadCount = { 0 };
for (var i = 0; i < RepositoryCount; ++i)
{
int i1 = i;
new TestDelegate(() => Assert.True(fileSystem.DeleteRepository(string.Format("repo_{0}", i1)))).BeginInvoke(
delegate {
Interlocked.Increment(ref threadCount[0]);
Assert.IsNull(fileSystem[string.Format("repo_{0}", i1)]);
}, null);
}
while (threadCount[0] != RepositoryCount)
{
Thread.Sleep(3000);
}
}