Using FluentAssertion 3.1.229, how do you compare the content of two distinct MemoryStream
?
Writing actualStream.Should().Be(expectedStream);
yields the following error:
System.IO.MemoryStream
{
CanRead = True
CanSeek = True
CanTimeout = False
CanWrite = True
Capacity = 8
Length = 8
Position = 0
ReadTimeout = "[Property 'ReadTimeout' threw an exception: 'Exception has been thrown by the target of an invocation.']"
WriteTimeout = "[Property 'WriteTimeout' threw an exception: 'Exception has been thrown by the target of an invocation.']"
}, but found
System.IO.MemoryStream
{
CanRead = True
CanSeek = True
CanTimeout = False
CanWrite = True
Capacity = 8
Length = 8
Position = 0
ReadTimeout = "[Property 'ReadTimeout' threw an exception: 'Exception has been thrown by the target of an invocation.']"
WriteTimeout = "[Property 'WriteTimeout' threw an exception: 'Exception has been thrown by the target of an invocation.']"
}.
Yes, I could use NUnit Assert.That(actualStream, Is.EqualTo(expectedStream));
but is it possible with FluentAssertions?
Thanks.