AWSSDK.UnitTests.OptimisticLockedFileTest.FileLockedByAnotherProcess C# (CSharp) Method

FileLockedByAnotherProcess() private method

private FileLockedByAnotherProcess ( ) : void
return void
        public void FileLockedByAnotherProcess()
        {
            using (var tester = new OptimisticLockedTextFileTester())
            {
                tester.TextFile.Lines.Add(Line);
                using (var streamWriter = File.AppendText(tester.TextFile.FilePath))
                {
                    AssertExtensions.ExpectException(() =>
                    {
                        tester.TextFile.Persist();
                    }, typeof(IOException), string.Format(FileLockedMessageFormat, tester.TextFile.FilePath));
                }
            }
        }