public void GetByIndex() { Assert.Throws <ArgumentOutOfRangeException>(() => _dictionary.GetByIndex(-1)); Assert.Throws <ArgumentOutOfRangeException>(() => _dictionary.GetByIndex(3)); Assert.AreEqual(new CloneableType("first value"), _dictionary.GetByIndex(0)); Assert.AreEqual(new CloneableType("third value"), _dictionary.GetByIndex(1)); Assert.AreEqual(new CloneableType("second value"), _dictionary.GetByIndex(2)); }