public void Should_be_able_to_lock_the_file() { _fileLocker1.AccessFile(_fileThatDoesExist); bool exceptionWasThrown = false; try { _fileLocker2.AccessFile(_fileThatDoesExist); } catch (Exception) { exceptionWasThrown = true; } exceptionWasThrown.ShouldBeTrue(); _fileLocker1.ReleaseFile(); _fileLocker2.AccessFile(_fileThatDoesExist); }
public void AccessFile(string fileFullPath) { _fileLocker.AccessFile(fileFullPath); }