public void Test5()
 {
     Condition c = Condition.Empty;
     c = c.And(CK.K["Id"].Eq(1)).Or(CK.K["Age"].Gt(18));
     var cc = new WhereClause(c);
     var dpc = new DataParameterCollection();
     Assert.AreEqual(" WHERE ([Id] = @Id_0) OR ([Age] > @Age_1)", cc.ToSqlText(dpc, new Access(), null));
 }
 public void Test3()
 {
     Condition c = Condition.Empty;
     c = ((c & null) | null);
     var cc = new WhereClause(c);
     var dpc = new DataParameterCollection();
     Assert.AreEqual("", cc.ToSqlText(dpc, new Access(), null));
 }
 public void Test4()
 {
     Condition c = Condition.Empty;
     c &= (CK.K["Id"] == 1 | CK.K["Age"] > 18);
     var cc = new WhereClause(c);
     var dpc = new DataParameterCollection();
     Assert.IsFalse(c is EmptyCondition);
     Assert.AreEqual(" WHERE ([Id] = @Id_0) OR ([Age] > @Age_1)", cc.ToSqlText(dpc, new Access(), null));
 }
 public void Test6()
 {
     Condition c = null;
     c &= (CK.K["Id"] == 1 | CK.K["Age"] > 18);
     c &= null;
     c |= null;
     c &= CK.K["Gender"] == true;
     var cc = new WhereClause(c);
     var dpc = new DataParameterCollection();
     Assert.AreEqual(" WHERE (([Id] = @Id_0) OR ([Age] > @Age_1)) AND ([Gender] = @Gender_2)", cc.ToSqlText(dpc, new Access(), null));
 }
 public void Test8()
 {
     Condition c = Condition.Empty;
     c = c.And(CK.K["Id"] == 1).Or(CK.K["Age"] > 18);
     c = c.And(null);
     c = c.Or(null);
     c = c.And(CK.K["Gender"].Eq(true));
     var cc = new WhereClause(c);
     var dpc = new DataParameterCollection();
     Assert.AreEqual(" WHERE (([Id] = @Id_0) OR ([Age] > @Age_1)) AND ([Gender] = @Gender_2)", cc.ToSqlText(dpc, new Access(), null));
 }