public void RenderNullPredicate() { Column column = new Column("Column1"); NullPredicate nullPredicate = new NullPredicate(column); Assert.AreEqual("[Column1] IS NULL", sqlClientRenderer.Render(nullPredicate)); }
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)); }
public void CreateNullPredicate() { Column column = new Column("Column1"); NullPredicate nullPredicate = new NullPredicate(column); Assert.AreEqual(column, nullPredicate.Expression); Assert.IsNull(nullPredicate.NotModifier); }
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); }
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(); }
public abstract string Render(NullPredicate nullPredicate);