public void Test_OpenFile_SaveFile()
        {
            string storePath = Path.Combine(baseDirectory, "Test");
            var storage = new DiskIsolateStorage("Test", storePath);
            storage.InitStore();

            //删除Test目录下的所以文件和文件夹
            string[] strDirs = Directory.GetDirectories(storePath);
            string[] strFiles = Directory.GetFiles(storePath);
            foreach (var file in strFiles)
                File.Delete(file);
            foreach (var dir in strDirs)
                Directory.Delete(dir, true);

            var fileName = "file.txt";
            //创建文件
            string testString = "This is teststring";
            MemoryStream stream = new MemoryStream();
            byte[] buffer = UTF8Encoding.Default.GetBytes(testString);
            stream.Write(buffer, 0, buffer.Length);
            storage.CreateFile(fileName, stream);

            //获取文件名、文件路径。。
            using (var of = storage.OpenFile(fileName, FileMode.Open))
            {
                var filePath = of.StorageFile.FilePath;
                var storageName = of.StorageFile.StorageName;

                //读取文件内容
                byte[] bytes = new byte[of.Stream.Length];
                UTF8Encoding temp = new UTF8Encoding(true);
                of.Stream.Seek(0, SeekOrigin.Begin);
                of.Stream.Read(bytes, 0, bytes.Length);
                string readStr = temp.GetString(bytes);
                Assert.AreEqual(testString, readStr);
            }
            //写文件并保存
            string writeString = "This is another teststring";
            byte[] buffer1 = UTF8Encoding.Default.GetBytes(writeString);
            using (var memoryStream = new MemoryStream(buffer1))
            {
                storage.UpdateFile(fileName, memoryStream);
            }

            //再读取文件内容
            using (var of1 = storage.OpenFile("file.txt", FileMode.Open))
            {
                byte[] b = new byte[of1.Stream.Length];
                UTF8Encoding temp1 = new UTF8Encoding(true);
                of1.Stream.Seek(0, SeekOrigin.Begin);
                of1.Stream.Read(b, 0, b.Length);
                string readStr1 = temp1.GetString(b);

                Assert.AreEqual(writeString, readStr1);
            }
        }