NUnit version 3.13.0
An ImmutableArray is a structure, but can contained a null array.
The following test fails with an InvalidOperationException: This operation cannot be performed on a default instance of ImmutableArray
ImmutableArray<string> expected = ImmutableArray.Create("Test");
ImmutableArray<string> actual = default(ImmutableArray<string>);
Assert.That(actual, Is.EquivalentTo(expected));
Same for Assert.That(actual, Is.Not.Empty);
It is a pity that Microsoft doesn't treat this the same as ImmutableArray<string>.Empty.
NUnit version 3.13.0
An ImmutableArray is a structure, but can contained a null array.
The following test fails with an InvalidOperationException: This operation cannot be performed on a default instance of ImmutableArray
Same for
Assert.That(actual, Is.Not.Empty);It is a pity that Microsoft doesn't treat this the same as
ImmutableArray<string>.Empty.