public void Test_07_TestGetExtension( ) { FileFilters filter = new FileFilters( ); string filters = ( "Word (*.doc)|*.doc|WordX (*.docx)|*.docx||" ); filter.PopulateCollections( filters ); Assert.AreEqual( ".doc", filter.GetExtension( 0 ) ); Assert.AreEqual( ".docx", filter.GetExtension( 1 ) ); Assert.AreEqual( "should throw IndexOutOfRangeExctption", filter.GetExtension( 2 ) ); }