Ejemplo n.º 1
0
        public void WriteAllTextShouldOverwriteHiddenFileContent()
        {
            var path = Path.GetTempFileName();

            File.WriteAllText(path, "hi there");
            File.SetAttributes(path, FileAttributes.Hidden);
            fileSystem.WriteAllText(path, "hi");
            Assert.AreEqual("hi", File.ReadAllText(path));
            Assert.AreNotEqual(0, File.GetAttributes(path) & FileAttributes.Hidden);
        }