public void AsArray() { var list = new List <int>(); var emptyArray = CollectionUtilities.EmptyArray <int>(); var listArray = CollectionUtilities.AsArray(list); XAssert.AreSame(emptyArray, listArray); list.Add(1); list.Add(2); list.Add(3); listArray = CollectionUtilities.AsArray(list); XAssert.IsTrue(Enumerable.SequenceEqual(list, listArray)); }