Esempio n. 1
0
        public void CopyTo()
        {
            IDictionary <string, Player> lhm = new LinkedHashMap <string, Player>();

            Fill(lhm);
            KeyValuePair <string, Player>[] destArray = new KeyValuePair <string, Player> [lhm.Count + 1];
            destArray[0] = new KeyValuePair <string, Player>("999", new Player("999", "The number nine"));
            lhm.CopyTo(destArray, 1);

            for (int i = 1; i < destArray.Length; i++)
            {
                Assert.AreEqual(players[i - 1].Id, destArray[i].Key);
                Assert.AreEqual(players[i - 1], destArray[i].Value);
            }
        }
		public void CopyTo()
		{
			IDictionary<string, Player> lhm = new LinkedHashMap<string, Player>();
			Fill(lhm);
			KeyValuePair<string, Player>[] destArray = new KeyValuePair<string, Player>[lhm.Count + 1];
			destArray[0] = new KeyValuePair<string, Player>("999", new Player("999", "The number nine"));
			lhm.CopyTo(destArray, 1);

			for (int i = 1; i < destArray.Length; i++)
			{
				Assert.AreEqual(players[i-1].Id, destArray[i].Key);
				Assert.AreEqual(players[i-1], destArray[i].Value);
			}
		}