Open
Description
Method below
public async Task<bool> VerifyClearAsync(string input, string output)
{
using (Stream inputStream = await input.GetStreamAsync())
using (Stream outputStream = new MemoryStream())
{
bool verified = await VerifyClearAsync(inputStream, outputStream);
outputStream.Seek(0, SeekOrigin.Begin);
output = await outputStream.GetStringAsync();
return verified;
}
}
should be declared as as
Task<bool> VerifyClearAsync(string input, ref string output)
ref keyword is mandatory, in order to get the output back.
string is an immutable class
STR:
string actual = string.Empty;
var verified = await _pgp.VerifyCleanAsync(signed, actual);
verified.Should().BeTrue(); // pass
actual.Should().NotBeEmpty(); // fail
actual.Should().BeEquivalentTo(expected); // fail: Expected actual to be equivalent to "this is a secret text" with a length of 21, but "" has a length of 0, differs near "" (index 0).
Metadata
Metadata
Assignees
Labels
No labels