public void TestAddStringFilterComboBox() { //---------------Set up test pack------------------- IFilterClause nullClause = new DataViewNullFilterClause(); IFilterControl filterControl = GetControlFactory().CreateFilterControl(); //---------------Execute Test ---------------------- filterControl.AddStringFilterComboBox("Test:", "TestColumn", new ArrayList(), true); //---------------Test Result ----------------------- Assert.AreEqual(nullClause.GetFilterClauseString(), filterControl.GetFilterClause().GetFilterClauseString()); //---------------Tear Down ------------------------- }
public void TestAddEnumFilterComboBox() { //---------------Set up test pack------------------- IFilterClause nullClause = new DataViewNullFilterClause(); IFilterControl filterControl = GetControlFactory().CreateFilterControl(); //---------------Execute Test ---------------------- filterControl.AddEnumFilterComboBox("Test:", "TestColumn", typeof(PurchaseOrderStatus)); //---------------Test Result ----------------------- Assert.AreEqual(nullClause.GetFilterClauseString(), filterControl.GetFilterClause().GetFilterClauseString()); //---------------Tear Down ------------------------- }
public void TestAddStringFilterTextBox() { //---------------Set up test pack------------------- IFilterClause nullClause = new DataViewNullFilterClause(); IFilterControl filterControl = GetControlFactory().CreateFilterControl(); //---------------Execute Test ---------------------- ITextBox tb = filterControl.AddStringFilterTextBox("Test:", "TestColumn"); tb.Text = ""; //---------------Test Result ----------------------- Assert.AreEqual(nullClause.GetFilterClauseString(), filterControl.GetFilterClause().GetFilterClauseString()); Assert.AreEqual(1, filterControl.FilterControls.Count); //---------------Tear Down ------------------------- }