public void RemoveDuplicateElementsTest(int[] source, int[] expected) { var list1 = new VSArray <int>(source); // Create new list, don't modify original var list2 = list1.GetRemoveDuplicateElements(); Assert.That(list1, Is.EqualTo(source.ToVSArray())); Assert.That(list2, Is.EqualTo(expected.ToVSArray())); // Modify original (in-place) list1.RemoveDuplicateElements(); Assert.That(list1, Is.EqualTo(expected.ToList())); Assert.That(list1, Is.EqualTo(list2)); }