public void Encryption()
        {
            string tempFile = Path.GetTempFileName();

            ExtendedFileInfo efi = new ExtendedFileInfo(tempFile);

            efi.Encrypt();
            efi.Refresh();

            Assert.IsTrue((efi.Attributes & FileAttributes.Encrypted) == FileAttributes.Encrypted);

            efi.Decrypt();
            efi.Refresh();
            Assert.IsFalse((efi.Attributes & FileAttributes.Encrypted) == FileAttributes.Encrypted);
        }
        public void Refresh()
        {
            string tempFile = Path.GetTempFileName();

            FileInfo fi = new FileInfo(tempFile);

            ExtendedFileInfo efi = new ExtendedFileInfo(tempFile);

            Assert.IsNotNull(efi);

            Assert.AreEqual(efi.Attributes, fi.Attributes);

            fi.Attributes |= FileAttributes.ReadOnly;
            efi.Refresh();

            Assert.AreEqual(efi.Attributes, fi.Attributes);

            fi.Attributes &= ~FileAttributes.ReadOnly;
        }