public void Test_2_5_CountWithQuery() { string bucketName = "bucket" + CurrentTimeMillis(); KiiBucket bucket = Kii.Bucket(bucketName); for (int i = 0; i < 15; i++) { KiiObject obj = bucket.NewKiiObject(); obj ["intField"] = i; obj.Save(); } KiiClause clause = KiiClause.GreaterThanOrEqual("intField", 10); int count = bucket.Count(new KiiQuery(clause)); Assert.AreEqual(5, count); }
public void Test_0351_GreaterThanOrEqual_value_null() { KiiClause c = KiiClause.GreaterThanOrEqual("name", null); Assert.AreEqual("{\"type\":\"range\",\"field\":\"name\",\"lowerIncluded\":true}", c.ToJson().ToString()); }
public void Test_0350_GreaterThanOrEqual_key_empty() { KiiClause.GreaterThanOrEqual("", "kii"); }
public void Test_0350_GreaterThanOrEqual_key_null() { KiiClause.GreaterThanOrEqual(null, "kii"); }
public void Test_0340_GreaterThanOrEqual_string() { KiiClause c = KiiClause.GreaterThanOrEqual("name", "kii"); Assert.AreEqual("{\"type\":\"range\",\"field\":\"name\",\"lowerLimit\":\"kii\",\"lowerIncluded\":true}", c.ToJson().ToString()); }
public void Test_0330_GreaterThanOrEqual_bool_true() { KiiClause.GreaterThanOrEqual("enable", true); }
public void Test_0320_GreaterThanOrEqual_double() { KiiClause c = KiiClause.GreaterThanOrEqual("score", 1.234); Assert.AreEqual("{\"type\":\"range\",\"field\":\"score\",\"lowerLimit\":1.234,\"lowerIncluded\":true}", c.ToJson().ToString()); }
public void Test_0310_GreaterThanOrEqual_long() { KiiClause c = KiiClause.GreaterThanOrEqual("score", (long)1234567890123); Assert.AreEqual("{\"type\":\"range\",\"field\":\"score\",\"lowerLimit\":1234567890123,\"lowerIncluded\":true}", c.ToJson().ToString()); }