Created
May 23, 2012 09:47
-
-
Save ericeijkelenboom/2774302 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void Select_and_addrange_should_maintain_element_order() | |
{ | |
var array = new[] {"3", "5", "1", "9", "2"}; | |
var list = new List<int>(); | |
list.AddRange(array.Select(s => int.Parse(s))); | |
Assert.AreEqual(3, list[0]); | |
Assert.AreEqual(5, list[1]); | |
Assert.AreEqual(1, list[2]); | |
Assert.AreEqual(9, list[3]); | |
Assert.AreEqual(2, list[4]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment