System.IO.Abstractions is a library that does a decent job at abstracting away the .NET Fx's unmockable file system access. You need to be aware that a lot of constructors that deal with file IO become unusable to you when you're trying to use IFileSystem all over the place to mock file system behavior in your unit tests. This can make things... challenging.

I am serializing/deserializing configuration data to/from disk. I wanted to mock this behavior for my unit tests. Serializing and deserializing XML in a way that works with System.IO.Abstractions is non-trivial. I found this StackOverflow answer that put me on the right path.

/* my unit test excerpt */  
var sb = new StringBuilder(1024);  
var serializer = new XmlSerializer(typeof(TransformerConfiguration));  
using (var sr = new StringWriter(sb))  
{
     var container = new TransformerConfiguration {Transformer = new SerialCsvTransformer {FirstLineContainsColumnNames = true}};
     serializer.Serialize(sr, container);
}
var encodedXml = Encoding.UTF8.GetBytes(sb.ToString());  
// and your dictionary collection for MockFileSystem will be...
new Dictionary<string, MockFileData> { { transformConfigPath, new MockFileData(encodedXml) }  
/* and the actual runtime path */  
var serializer = new XmlSerializer(typeof(TransformerConfiguration));  
ITransformer transformer;  
try  
{
    using (var stream = fs.File.OpenText(path))
    {
        using (var reader = new XmlTextReader(stream))
        {
            var transformerConfiguration = serializer.Deserialize(reader) as TransformerConfiguration;
            if (transformerConfiguration == null)
            {
                throw new ConfigurationException("transformerConfigruation was unexpectedly null after [successful] deserialization");
            }
            transformer = transformerConfiguration.Transformer;
            reader.Close();
        }
        stream.Close();
    }

}