public void CreateKeys_Encrypt_Decrypt() { // Create keys _sut.CreateAsymmetricKey(); Assert.That(_sut.CryptoServiceProviderIsPublicOnly, Is.False); _sut.ExportPublicKey(PublicKeyFile); // Encrypt _sut.EncryptFile(OriginalFile, EncryptedFile); // Decrypt _sut.DecryptFile(EncryptedFile, DecryptedFile); Assert.That(File.ReadAllText(DecryptedFile), Is.EqualTo(Constants.PlainText)); }