1 // ****************************************************************
\r
2 // This is free software licensed under the NUnit license. You
\r
3 // may obtain a copy of the license as well as information regarding
\r
4 // copyright ownership at http://nunit.org/?p=license&r=2.4.
\r
5 // ****************************************************************
\r
8 using System.Collections;
\r
11 namespace NUnit.Util
\r
13 public class CategoryManager
\r
15 private Hashtable categories = new Hashtable();
\r
17 public void Add(string name)
\r
19 categories[name] = name;
\r
22 public void Add(IList list)
\r
24 foreach(string name in list)
\r
30 public void AddCategories( ITest test )
\r
32 if ( test.Categories != null )
\r
33 Add( test.Categories );
\r
36 public void AddAllCategories( ITest test )
\r
38 AddCategories( test );
\r
40 foreach( ITest child in test.Tests )
\r
41 AddAllCategories( child );
\r
44 public ICollection Categories
\r
46 get { return categories.Values; }
\r
49 public void Clear()
\r
51 categories = new Hashtable();
\r