private void AddCategories(Test test) { foreach (TestAttribute t in test.CategoryList) { if (!categoryList.Contains((Category)t)) { categoryList.Categories.Add(t); } } }
public void Contains() { AttributeList<string> list = new AttributeList<string>(_Mgr, ""); string val0 = "blah 1"; string val1 = "Kah 1"; list.List.Add(val0); list.List.Add(val1); Assert.AreEqual(2, list.Count, "list.Count should be 2"); bool result = list.Contains(val0); Assert.AreEqual(true, result, "result should match expected"); result = list.Contains(val1); Assert.AreEqual(true, result, "result should match expected"); result = list.Contains("ggg"); Assert.AreEqual(false, result, "result should match expected"); }