Esempio n. 1
0
        public void TestFilterClause()
        {
            //---------------Set up test pack-------------------
            _testBuilder.Operator = FilterClauseOperator.OpGreaterThan;
            _testBuilder.UsingEnumTypeConstructor = true;
            var filter   = _testBuilder.CreateInstance();
            var comboBox = (IComboBox)filter.Control;
            var text     = Convert.ToString(PurchaseOrderStatus.Processed);

            comboBox.Text          = text;
            comboBox.SelectedIndex = 2;
            //---------------Execute Test ----------------------
            IFilterClause filterClause = filter.GetFilterClause(new DataViewFilterClauseFactory());

            //---------------Test Result -----------------------
            Assert.AreEqual(string.Format("{0} > '{1}'", _testBuilder.PropertyName, PurchaseOrderStatus.Processed), filterClause.GetFilterClauseString());
        }