Ejemplo n.º 1
0
        public void TestEncryptionBoundaryFileEncryptEmptyString()
        {
            const string toEncryptFile     = "encryption_test_commonlibrary.txt";
            FileInfo     toEncryptFileInfo = ConfigFileLocator.GetFromAppConfigLocation(toEncryptFile);

            EncryptionUtil.EncryptFile(toEncryptFileInfo, "");
        }
Ejemplo n.º 2
0
        public void TestEncryptFile()
        {
            const string toEncryptFile     = "encryption_test_commonlibrary.txt";
            const string encryptedFile     = "post-encryption_test_commonlibrary.txt";
            FileInfo     toEncryptFileInfo = ConfigFileLocator.GetFromAppConfigLocation(toEncryptFile);

            Assert.NotNull(toEncryptFileInfo);

            FileInfo encryptedFileInfo = new FileInfo(toEncryptFileInfo.DirectoryName + @"\" + encryptedFile);

            EncryptionUtil.EncryptFile(toEncryptFileInfo, encryptedFileInfo.FullName);

            Assert.IsTrue(encryptedFileInfo.Exists);
        }
Ejemplo n.º 3
0
 public void TestEncryptionBoundaryFileEncryptNullFile()
 {
     EncryptionUtil.EncryptFile(null, "");
 }