public async Task TextFileRamDiskDirectory_FileExists_True_Append_True()
        {
            // ILogger will only print to Output when tests are run in Debug mode.
            ILogger logger = new Logger();

            logger.SetWorker(
                (type, loggingLevel, logAction, message) =>
                {
                    Debug.WriteLine("ILogger: {0}, {1}, {2}, {3}", type, loggingLevel, logAction, message);
                }
                );

            logger.Log(this.GetType(), LoggingLevel.System, LogAction.UnitTestStart, "TextFileRamDiskDirectory_FileExists_True_Append_True");

            var directory = new TextFileRamDiskDirectory("TestName", logger: logger);

            var write = directory.OpenWriter("something.txt", true);

            Assert.IsTrue(directory.FileExists("something.txt"));

            logger.Log(this.GetType(), LoggingLevel.System, LogAction.UnitTestEnd, "TextFileRamDiskDirectory_FileExists_True_Append_True");
        }
        public async Task SaveToDevice_Throws_SaveToDeviceException()
        {
            ILogger logger = new Logger();

            logger.SetWorker(
                (type, loggingLevel, logAction, message) =>
                {
                    // The Logger will only print to Output when tests are run in Debug mode.
                    Debug.WriteLine("ILogger: {0}, {1}, {2}, {3}", type, loggingLevel, logAction, message);
                }
                );

            logger.Log(this.GetType(), LoggingLevel.System, LogAction.UnitTestStart, "SaveToDevice_Throws_SaveToDeviceException");

            var directory = new TextFileRamDiskDirectory("testDirectoryName", null, logger);
            Assert.IsFalse(directory.CanSaveToDevice);

            var file = directory.OpenWriter("TestFileName.txt", false);
            await file.WriteAsync(
                  "Text that wont be saved to device because ISaveToDeviceManager object not passed into directory when instantiated");
            file.Close();

            var isExceptionThrown = false;
            try
            {
                await directory.SaveFilesToDevice();
            }
            catch (SaveToDeviceException ex)
            {
                Assert.IsTrue(
                    ex.Message.Equals(
                        "SaveToDeviceException: Device Storage Manager implementing ISaveToDevice interface was not passed into TextFileRamDiskDirectory with directory name testDirectoryName. [Com.Xamtastic.Patterns.TextFileRamDisk.Exceptions]"));
                isExceptionThrown = true;
            }

            Assert.IsTrue(isExceptionThrown);

            logger.Log(this.GetType(), LoggingLevel.System, LogAction.UnitTestEnd, "SaveToDevice_Throws_SaveToDeviceException");
        }