public override string Render(BooleanLiteralValue booleanLiteralValue) { if (ReplaceLiteralsWithParameters) { return(AddParameter(booleanLiteralValue.Literal, DbType.Boolean).Render(this)); } else { return(string.Format("{0}", Convert.ToInt32(booleanLiteralValue.Literal))); } }
public void RenderBooleanLiteralValue() { BooleanLiteralValue booleanLiteralValue = new BooleanLiteralValue(true); Assert.AreEqual("1", sqlClientRenderer.Render(booleanLiteralValue)); }
public void CreateBooleanLiteralValue() { BooleanLiteralValue booleanLiteralValue = new BooleanLiteralValue(true); Assert.AreEqual(true, booleanLiteralValue.Literal); }
public abstract string Render(BooleanLiteralValue booleanLiteralValue);