diff --git a/src/QnapBackupDecryptor.Core.Tests/DecryptorTests.cs b/src/QnapBackupDecryptor.Core.Tests/DecryptorTests.cs index bd5a19c..bc1ce90 100644 --- a/src/QnapBackupDecryptor.Core.Tests/DecryptorTests.cs +++ b/src/QnapBackupDecryptor.Core.Tests/DecryptorTests.cs @@ -1,6 +1,5 @@ using NUnit.Framework; using Shouldly; -using System; using System.IO; using System.Text; @@ -25,8 +24,10 @@ public void OpenSSLDecrypt_Text() var sslDecrypt = OpenSsl.Decrypt(encryptedFile, passwordBytes, decryptedFile); // Assert - var decryptedText = File.ReadAllText(sslDecrypt.Data.FullName); - decryptedText.ShouldBe($"line1: this is a plaintext file{Environment.NewLine}line2: End!{Environment.NewLine}"); + var decryptedText = File.ReadAllLines(sslDecrypt.Data.FullName); + decryptedText.Length.ShouldBe(2); + decryptedText[0].ShouldStartWith("line1: this is a plaintext file"); + decryptedText[1].ShouldStartWith("line2: End!"); } [Test]