Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-s committed Feb 22, 2021
1 parent 08dc9fa commit 0590d67
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/QnapBackupDecryptor.Core.Tests/DecryptorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public class DecryptorTests
public void OpenSSLDecrypt_Text()
{
// Arrange
var encryptedFile = new FileInfo(@"TestFiles/encrypted.txt");
var decryptedFile = new FileInfo(@"TestFiles/plaintext.txt");
var encryptedFile = new FileInfo(Path.Combine("TestFiles", "encrypted.txt"));
var decryptedFile = new FileInfo(Path.Combine("TestFiles", "plaintext.txt"));

// Act
var passwordBytes = Encoding.UTF8.GetBytes(PASSWORD);
Expand All @@ -34,14 +34,12 @@ public void OpenSSLDecrypt_Text()
public void OpenSSLDecrypt_Binary()
{
// Arrange
var encryptedFile = new FileInfo(@"TestFiles/encrypted.jpg");
var decryptedFile = new FileInfo(@"TestFiles/decrypted.jpg");

var encryptedFile = new FileInfo(Path.Combine("TestFiles", "encrypted.jpg"));
var decryptedFile = new FileInfo(Path.Combine("TestFiles", "decrypted.jpg"));

// Act
var passwordBytes = Encoding.UTF8.GetBytes(PASSWORD);
var decrpyted = OpenSsl.Decrypt(encryptedFile, passwordBytes, decryptedFile);

var decrypted = OpenSsl.Decrypt(encryptedFile, passwordBytes, decryptedFile);

// Assert
//var decryptedText = File.ReadAllText(decrpyted.FullName);
Expand Down

0 comments on commit 0590d67

Please sign in to comment.