public void Should_Clear_TypeSelector_List() { //Create a new TypeTable var table = new TypeTable(false); //Create some selectors that we're going to add var stringSelector1 = new StringSelector(); var stringSelector2 = new FullNameSelector(); Assert.AreEqual(0, table.CountSelectors <string>(), "should have ZERO type selectors for type 'string' since we haven't added any yet"); //Add some type selectors to our typetable table.AddSelector(stringSelector1); table.AddSelector(stringSelector2); //Check to see that our table contains at least two items... Assert.AreEqual(2, table.CountSelectors <string>(), "should have TWO type selectors for type 'string'"); //Clear all of the string selectors table.ClearSelectors <string>(); //Count the new number of string selectors (should equal zero) Assert.AreEqual(0, table.CountSelectors <string>()); }
public void Should_Clear_TypeSelector_List() { //Create a new TypeTable var table = new TypeTable(false); //Create some selectors that we're going to add var stringSelector1 = new StringSelector(); var stringSelector2 = new FullNameSelector(); Assert.AreEqual(0, table.CountSelectors<string>(), "should have ZERO type selectors for type 'string' since we haven't added any yet"); //Add some type selectors to our typetable table.AddSelector(stringSelector1); table.AddSelector(stringSelector2); //Check to see that our table contains at least two items... Assert.AreEqual(2, table.CountSelectors<string>(), "should have TWO type selectors for type 'string'"); //Clear all of the string selectors table.ClearSelectors<string>(); //Count the new number of string selectors (should equal zero) Assert.AreEqual(0, table.CountSelectors<string>()); }