Esempio n. 1
0
        public void Basic_file_Encryption()
        {
            String fileName = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());

            _sut.SaveFile(fileName, "This is content", false, true);

            var content = File.ReadAllText(fileName);

            Assert.That(content, Is.Not.EqualTo("This is content"));

            content = _sut.GetFileContent(fileName, true);
            Assert.That(content, Is.EqualTo("This is content"));
        }