示例#1
0
        public void RenderNullPredicate()
        {
            Column        column        = new Column("Column1");
            NullPredicate nullPredicate = new NullPredicate(column);

            Assert.AreEqual("[Column1] IS NULL", sqlClientRenderer.Render(nullPredicate));
        }
示例#2
0
        public void RenderNullPredicateWithNotModifier()
        {
            Column        column        = new Column("Column1");
            NotModifier   notModifier   = new NotModifier();
            NullPredicate nullPredicate = new NullPredicate(column, notModifier);

            Assert.AreEqual("[Column1] IS NOT NULL", sqlClientRenderer.Render(nullPredicate));
        }
示例#3
0
        public void CreateNullPredicate()
        {
            Column        column        = new Column("Column1");
            NullPredicate nullPredicate = new NullPredicate(column);

            Assert.AreEqual(column, nullPredicate.Expression);
            Assert.IsNull(nullPredicate.NotModifier);
        }
示例#4
0
        public void CreateNullPredicateWithNotModifier()
        {
            Column        column        = new Column("Column1");
            NotModifier   notModifier   = new NotModifier();
            NullPredicate nullPredicate = new NullPredicate(column, notModifier);

            Assert.AreEqual(nullPredicate.Expression, column);
            Assert.AreEqual(notModifier, nullPredicate.NotModifier);
        }
示例#5
0
        public override string Render(NullPredicate nullPredicate)
        {
            StringBuilder text = new StringBuilder();

            text.AppendFormat("{0} IS ", nullPredicate.Expression.Render(this));

            if (nullPredicate.NotModifier != null)
            {
                text.AppendFormat("{0} ", nullPredicate.NotModifier.Render(this));
            }

            text.Append("NULL ");

            return(text.ToString().Trim());
        }
 public void SetUp()
 {
     _rows      = new List <Row>();
     _column    = new ColumnBuilder().Build();
     _predicate = new NullPredicate();
 }
示例#7
0
 public abstract string Render(NullPredicate nullPredicate);