Skip to content

Commit

Permalink
Fix test newlines for Win/Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-s committed Feb 18, 2021
1 parent 59b9df9 commit 1552e53
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/QnapBackupDecryptor.Core.Tests/DecryptorTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using NUnit.Framework;
using Shouldly;
using System;
using System.IO;
using System.Text;

Expand All @@ -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]
Expand Down

0 comments on commit 1552e53

Please sign in to comment.