public void create_equals_criteria() { EqualsCriteria cri = new EqualsCriteria("id", 1); Assert.IsNotNull(cri); Assert.AreEqual(1, cri.Value); }
public void test_equals_visit() { CriteriaVisitor visitor = new CriteriaVisitor(); EqualsCriteria criteria = new EqualsCriteria("id", 2); string shard = criteria.GetShard(visitor); DebugHelper.WriteToConsole("shard = " + shard); Assert.AreEqual("id = '2'", shard); }
public override string GetShard(EqualsCriteria criteria) { return String.Format("{0} = '{1}'", criteria.Field, criteria.Value.ToString()); }