Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public void AccessFile(string fileFullPath)
 {
    _fileLocker.AccessFile(fileFullPath);
 }