public void Test_Construct_BoolComboBoxFilter_ShouldSetPropNameAndFilterOperator() { //---------------Set up test pack------------------- const string expectedPropName = "TestColumn"; //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var boolComboBoxFilter = new BoolComboBoxFilter(GetControlFactory(), expectedPropName); //---------------Test Result ----------------------- Assert.AreEqual(expectedPropName, boolComboBoxFilter.PropertyName); Assert.AreEqual(FilterClauseOperator.OpEquals, boolComboBoxFilter.FilterClauseOperator); Assert.IsInstanceOf <IComboBox>(boolComboBoxFilter.Control); }
public void Test_Construct_BoolComboBoxFilter_ShouldSetOptionsTrueAndFalse() { //---------------Set up test pack------------------- const string expectedPropName = "TestColumn"; //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var boolComboBoxFilter = new BoolComboBoxFilter(GetControlFactory(), expectedPropName); //---------------Test Result ----------------------- var comboBox = (IComboBox)boolComboBoxFilter.Control; Assert.AreEqual(3, comboBox.Items.Count); Assert.IsTrue(comboBox.Items.Contains("True"), "Should Contain True"); Assert.IsTrue(comboBox.Items.Contains("False"), "Should Contain False"); }