Package com.alibaba.fastjson.support.odps.udf

Examples of com.alibaba.fastjson.support.odps.udf.JSONContainsValue.evaluate()



public class JSONContainsValue_Test extends TestCase {
    public void test_contians() throws Exception {
        JSONContainsValue udf = new JSONContainsValue();
        Assert.assertTrue(udf.evaluate("{\"name\":\"123\"}", "$.name", "123"));
        Assert.assertFalse(udf.evaluate("{\"name\":\"123\"}", "$.name", "124"));
        Assert.assertTrue(udf.evaluate("{\"name\":\"123\"}", "$.value", (Long) null));
    }
   
    public void test_array_contians() throws Exception {
View Full Code Here


public class JSONContainsValue_Test extends TestCase {
    public void test_contians() throws Exception {
        JSONContainsValue udf = new JSONContainsValue();
        Assert.assertTrue(udf.evaluate("{\"name\":\"123\"}", "$.name", "123"));
        Assert.assertFalse(udf.evaluate("{\"name\":\"123\"}", "$.name", "124"));
        Assert.assertTrue(udf.evaluate("{\"name\":\"123\"}", "$.value", (Long) null));
    }
   
    public void test_array_contians() throws Exception {
        JSONContainsValue udf = new JSONContainsValue();
View Full Code Here

public class JSONContainsValue_Test extends TestCase {
    public void test_contians() throws Exception {
        JSONContainsValue udf = new JSONContainsValue();
        Assert.assertTrue(udf.evaluate("{\"name\":\"123\"}", "$.name", "123"));
        Assert.assertFalse(udf.evaluate("{\"name\":\"123\"}", "$.name", "124"));
        Assert.assertTrue(udf.evaluate("{\"name\":\"123\"}", "$.value", (Long) null));
    }
   
    public void test_array_contians() throws Exception {
        JSONContainsValue udf = new JSONContainsValue();
        Assert.assertTrue(udf.evaluate("{\"name\":[\"123\"]}", "$.name", "123"));
View Full Code Here

        Assert.assertTrue(udf.evaluate("{\"name\":\"123\"}", "$.value", (Long) null));
    }
   
    public void test_array_contians() throws Exception {
        JSONContainsValue udf = new JSONContainsValue();
        Assert.assertTrue(udf.evaluate("{\"name\":[\"123\"]}", "$.name", "123"));
        Assert.assertFalse(udf.evaluate("{\"name\":[\"123\"]}", "$.name", "124"));
        Assert.assertTrue(udf.evaluate("{\"name\":[\"123\"]}", "$.value", (Long) null));
        Assert.assertFalse(udf.evaluate("{\"name\":[\"123\"]}", "$.name", (Long) null));
    }
}
View Full Code Here

    }
   
    public void test_array_contians() throws Exception {
        JSONContainsValue udf = new JSONContainsValue();
        Assert.assertTrue(udf.evaluate("{\"name\":[\"123\"]}", "$.name", "123"));
        Assert.assertFalse(udf.evaluate("{\"name\":[\"123\"]}", "$.name", "124"));
        Assert.assertTrue(udf.evaluate("{\"name\":[\"123\"]}", "$.value", (Long) null));
        Assert.assertFalse(udf.evaluate("{\"name\":[\"123\"]}", "$.name", (Long) null));
    }
}
View Full Code Here

   
    public void test_array_contians() throws Exception {
        JSONContainsValue udf = new JSONContainsValue();
        Assert.assertTrue(udf.evaluate("{\"name\":[\"123\"]}", "$.name", "123"));
        Assert.assertFalse(udf.evaluate("{\"name\":[\"123\"]}", "$.name", "124"));
        Assert.assertTrue(udf.evaluate("{\"name\":[\"123\"]}", "$.value", (Long) null));
        Assert.assertFalse(udf.evaluate("{\"name\":[\"123\"]}", "$.name", (Long) null));
    }
}
View Full Code Here

    public void test_array_contians() throws Exception {
        JSONContainsValue udf = new JSONContainsValue();
        Assert.assertTrue(udf.evaluate("{\"name\":[\"123\"]}", "$.name", "123"));
        Assert.assertFalse(udf.evaluate("{\"name\":[\"123\"]}", "$.name", "124"));
        Assert.assertTrue(udf.evaluate("{\"name\":[\"123\"]}", "$.value", (Long) null));
        Assert.assertFalse(udf.evaluate("{\"name\":[\"123\"]}", "$.name", (Long) null));
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.