public void UpdateNegativeTest() { const string data = "How now, brown cow?"; var list = data.Split().Aggregate(RList <string> .Empty, (current, word) => RList <string> .Cons(word, current)); var exception = AssertThrows <ArgumentException>(() => RList <string> .Fupdate(null, -1, list)); Assert.AreEqual("Negative\r\nParameter name: i", exception.Message); }
public void UpdateEmptyTest() { var exception = AssertThrows <ArgumentNullException>(() => RList <string> .Fupdate(null, 0, RList <string> .Empty)); Assert.AreEqual("Value cannot be null.\r\nParameter name: ts", exception.Message); }