public void RetryFileActionThrowFileNotFoundException()
        {
            var fileName2 = ".\\test.xml";
            var fileInfo2 = new FileInfo(fileName2);

            fileInfo2.RetryFileActionIfLocked(fi =>{ var reader = fileInfo2.OpenText(); });
        }
        public void RetryFileActionThrowIOException()
        {
            var fileName2 = ".\\test.xml";         
            var fileInfo2 = new FileInfo(fileName2);

            fileInfo2.RetryFileActionIfLocked(fi =>{ throw new IOException(); });
        }      
 public void RetryFileActionThrowIOExceptionWhenFileLocked()
 {
     this.fileStream = this.fileInfo.OpenWrite();
     var fileInfoAnother = new FileInfo(TestFilePath);
     fileInfoAnother.RetryFileActionIfLocked(fi => fileInfoAnother.OpenText());
 }