I've seen this loop duplicated as well. If you don't/can't use CollectionAssert.AreEqual, then extract out an assert helper function and use that.