There are times when you want to test that some method returns the same array that was passed into it. For example:
[Test]
public void CombineNullFirstBufferReturnsSecond()
{
var second = new byte[] { 1 };
var b = ArrayExtensions.Combine(null, second);
b.Should().BeSameAs(second); // this won't compile
}
Please consider adding this method, and perhaps related to any reference type, but in this case at least for arrays.
[Test]
public void CombineNullFirstBufferReturnsSecond()
{
var second = new byte[] { 1 };
var b = ArrayExtensions.Combine(null, second);
b.Should().BeSameAs(second); // this won't compile
}
Please consider adding this method, and perhaps related to any reference type, but in this case at least for arrays.