package net.northking.cctp.element.basic.utils;

import net.northking.cctp.element.core.IExecuteContext;
import net.northking.cctp.element.test.SampleExecuteContext;
import org.junit.Test;

/**
 * ContextUtilTest
 *
 * @author fengxiang.zhang
 * @since 1.0
 */
public class ContextUtilTest {

    @Test
    public void test2() {
        IExecuteContext context = new SampleExecuteContext.Builder()
                .putGlobalVariable("a", "123", "number")
                .putVariable("a", "456", "number")
                .build();
        Object result = ContextUtil.evalBooleanExpression(context, "#{a} + ${a}  == #{a} + ${a}");
        System.out.println(result);
    }

}
