public void GroupDicADD()
		{
			var prueba = new string[] { "hola", "adios" };
			var e = new GroupDic<int, char>();
			for (var f = 0; f < prueba.Length; f++)
				e.Add(f, prueba[f].ToCharArray());
			for (var f = 0; f < prueba.Length; f++)
				Assert.AreEqual(new string(e[f].ToArray()),prueba[f]);
		}
		public void GroupDicEmpty()
		{
			var e = new GroupDic<int, string>(null,null,false);
			var e2 = new GroupDic<int, string>(null, null, true);
			for (var f = 0; f < 2; f++)
			{
				e.Add(f, null);
				e2.Add(f, null);
			}
			Assert.IsTrue(e.GetOne(0) == null);
			Assert.IsTrue(e.GetOne(1) == null);
			Assert.IsTrue(!e.ContainsKey(0));
			Assert.IsTrue(!e.ContainsKey(1));
			Assert.IsTrue(e2.GetOne(0) == null);
			Assert.IsTrue(e2.GetOne(1) == null);
			Assert.IsTrue(e2.ContainsKey(0));
			Assert.IsTrue(e2.ContainsKey(1));
		}
Exemple #3
0
 public QQGroup GetGroupByGid(long gid)
 {
     return(GroupDic.GetOrDefault(gid));
 }