public void GetTagWithNameTest() { TagCollection myCollection = new TagCollection(); foreach (var item in testTags.Values) { myCollection.AddTag(item); } int boolcount = 0; foreach (var item in testTags.Keys) { if (item.StartsWith("bool")) { if (myCollection.GetBoolTagWithName(item) != null) { boolcount++; } } } int ushortcount = 0; foreach (var item in testTags.Keys) { if (item.StartsWith("ushort")) { if (myCollection.GetUshortTagWithName(item) != null) { ushortcount++; } } } int floatcount = 0; foreach (var item in testTags.Keys) { if (item.StartsWith("float")) { if (myCollection.GetFloatTagWithName(item) != null) { floatcount++; } } } int totalcount = 0; foreach (var item in testTags.Keys) { if (myCollection.GetTagWithName(item) != null) { totalcount++; } } Assert.AreEqual(20, boolcount); Assert.AreEqual(20, ushortcount); Assert.AreEqual(20, floatcount); Assert.AreEqual(60, totalcount); }