public void AsCollection_Enumerable() { var xs = new[] { 2, 3, 5 }.Select(x => x); var ys = CollectionExtensions.AsCollection(xs); Assert.IsTrue(xs.SequenceEqual(ys)); }
public void AsCollection_Null() { var xs = default(int[]); var ys = CollectionExtensions.AsCollection(xs); Assert.AreEqual(0, ys.Count); }
public void AsCollection_Array() { var xs = new[] { 2, 3, 5 }; var ys = CollectionExtensions.AsCollection(xs); Assert.AreSame(xs, ys); }