public void path_cannot_be_opened_or_modified_while_reader_has_it_open()
{
var path = Path.GetTempFileName();
using(var reader = new RecordingMessageReader(CreateEmptyInnerReader(), path))
{
Assert.Throws<IOException>(() => File.Delete(path));
Assert.Throws<IOException>(() => File.OpenRead(path).Dispose());
Assert.Throws<IOException>(() => File.OpenWrite(path).Dispose());
}
File.Delete(path);
}