public void TestAddColl() { ViewInfoCollection viColl2 = new ViewInfoCollection(); viColl2["D"] = new ViewInfo("D", typeof(decimal)); viColl2["E"] = new ViewInfo("E", typeof(long)); viColl.Add(viColl2); Assert.AreEqual(4, viColl.Count); Assert.AreSame(viColl2["D"], viColl["D"]); Assert.AreSame(viColl2["E"], viColl["E"]); }
public void TestAddColl() { vibtColl2[typeof(decimal)] = new ViewInfoCollection(); vibtColl2[typeof(long)] = new ViewInfoCollection(); vibtColl2[typeof(long)].Add(vi1); vibtColl.Add(vibtColl2); Assert.AreEqual(4, vibtColl.Count); Assert.AreSame(vibtColl2[typeof(decimal)], vibtColl[typeof(decimal)]); Assert.AreSame(vibtColl2[typeof(long)], vibtColl[typeof(long)]); vibtColl3[typeof(long)] = new ViewInfoCollection(); vibtColl3[typeof(long)].Add(vi2); vibtColl.Add(vibtColl3); Assert.AreEqual(4, vibtColl.Count); Assert.AreEqual(2, vibtColl[typeof(long)].Count); Assert.AreSame(vi1, vibtColl2[typeof(long)]["vi1"]); Assert.AreSame(vi2, vibtColl2[typeof(long)]["vi2"]); }
public void TestSetup() { viColl = new ViewInfoCollection(); viColl["A"] = new ViewInfo("A", typeof(int)); viColl["B"] = new ViewInfo("B", typeof(string)); }
public ViewInfosByTaskCollection GetFromAssembly(Assembly assembly) { ViewInfosByTaskCollection result = new ViewInfosByTaskCollection(); result[typeof(int)] = new ViewInfoCollection(); if (assembly == inputAssembly1) result[typeof(int)].Add(vi1); else if (assembly == inputAssembly2) result[typeof(int)].Add(vi2); else if (assembly == inputAssembly3) result[typeof(int)].Add(vi3); return result; }
public void Add(ViewInfoCollection viewInfColl) { foreach (ViewInfo vi in viewInfColl) Add(vi); }
public void TestSetup() { vibtColl = new ViewInfosByTaskCollection(); vibtColl[typeof(int)] = new ViewInfoCollection(); vibtColl[typeof(string)] = new ViewInfoCollection(); }