2021-Apr-01 update
I recommend using FluentAssertions. It has a vast IntelliSense-friendly assertion library for many use cases including collections
collection.Should().Equal(1, 2, 5, 8);
collection.Should().NotEqual(8, 2, 3, 5);
collection.Should().BeEquivalentTo(8, 2, 1, 5);
Original answer
xUnit.Net recognizes collections so you just need to do
Assert.Equal(expected, actual); // Order is important
You can see other available collection assertions in CollectionAsserts.cs
For NUnit library collection comparison methods are
CollectionAssert.AreEqual(IEnumerable, IEnumerable) // For sequences, order matters
and
CollectionAssert.AreEquivalent(IEnumerable, IEnumerable) // For sets, order doesn't matter
More details here: CollectionAssert
MbUnit also has collection assertions similar to NUnit: Assert.Collections.cs
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…