public void SetFilter()
        {
            var control = new ColumnFilterLogic(typeof(double), "Column1");

            control.SetFilter(2);
            Assert.AreEqual("[Column1] = 2", control.BuildSQLCommand(control.ValueText));
        }
Ejemplo n.º 2
0
 public void SetFilterTest()
 {
     using (var crtl = new ColumnFilterLogic(typeof(double), "Column1"))
     {
         crtl.SetFilter(2);
         Assert.AreEqual("[Column1] = 2", crtl.BuildSQLCommand(crtl.ValueText));
     }
 }
Ejemplo n.º 3
0
 public void NotifyPropertyChangedTest()
 {
     using (var crtl = new ColumnFilterLogic(typeof(double), "Column1"))
     {
         string prop = null;
         crtl.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e) { prop = e.PropertyName; };
         crtl.ValueText        = "2";
         Assert.AreEqual("ValueText", prop);
         Assert.AreEqual("[Column1] = 2", crtl.BuildSQLCommand(crtl.ValueText));
     }
 }
Ejemplo n.º 4
0
        public void BuildSQLCommandTest()
        {
            using (var crtl = new ColumnFilterLogic(typeof(double), "Column1"))
            {
                Assert.AreEqual("[Column1] = 2", crtl.BuildSQLCommand("2"));
            }

            using (var crtl = new ColumnFilterLogic(typeof(double), "[Column1]"))
            {
                Assert.AreEqual("[Column1] = 2", crtl.BuildSQLCommand("2"));
            }

            using (var crtl = new ColumnFilterLogic(typeof(string), "Column1"))
            {
                Assert.AreEqual("[Column1] = '2'", crtl.BuildSQLCommand("2"));
            }
        }
        public void BuildSQLCommand()
        {
            {
                var columnFilterLogic = new ColumnFilterLogic(typeof(double), "Column1");

                Assert.AreEqual("[Column1] = 2", columnFilterLogic.BuildSQLCommand("2"));
            }

            {
                var columnFilterLogic = new ColumnFilterLogic(typeof(double), "[Column1]");
                Assert.AreEqual("[Column1] = 2", columnFilterLogic.BuildSQLCommand("2"));
            }

            {
                var columnFilterLogic = new ColumnFilterLogic(typeof(string), "Column1");
                Assert.AreEqual("[Column1] = '2'", columnFilterLogic.BuildSQLCommand("2"));
            }
        }