// Path: src/main/java/org/wmaop/aop/matcher/MatchResult.java
// public class MatchResult {
// 
// 	public static final MatchResult FALSE = new MatchResult(false, "undefined");
// 	public static final MatchResult TRUE = new MatchResult(true, "undefined");
// 	
// 	private final boolean isMatch;
// 	private final String id;
// 
// 	public MatchResult(boolean result, String id) {
// 		this.id = id;
// 		isMatch = result;
// 	}
// 
// 	public boolean isMatch() {
// 		return isMatch;
// 	}
// 
// 	public String getId() {
// 		return id;
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return "MatchResult:"+isMatch+" for " + id;
// 	}
// }


import static org.junit.Assert.*;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import org.wmaop.aop.matcher.MatchResult;
import com.wm.data.IData;
import com.wm.data.IDataCursor;
import com.wm.data.IDataFactory;
import com.wm.data.IDataUtil;

package org.wmaop.aop.matcher.jexl;





public class JexlIDataMatcherTest {

	@Test
	public void shouldHandleMultipleExpressions() {
		Map<String, String> exprs = new HashMap<>();
		exprs.put("expr1", "foo == 'a'");
		exprs.put("expr2", "foo == 'b'");
		JexlIDataMatcher jidm = new JexlIDataMatcher(exprs);

		IData idata = IDataFactory.create();
		IDataCursor idc = idata.getCursor();
		IDataUtil.put(idc, "foo", "x");
		assertFalse(jidm.match(idata).isMatch());

		IDataUtil.put(idc, "foo", "a");

// Path: src/main/java/org/wmaop/aop/matcher/MatchResult.java
// public class MatchResult {
// 
// 	public static final MatchResult FALSE = new MatchResult(false, "undefined");
// 	public static final MatchResult TRUE = new MatchResult(true, "undefined");
// 	
// 	private final boolean isMatch;
// 	private final String id;
// 
// 	public MatchResult(boolean result, String id) {
// 		this.id = id;
// 		isMatch = result;
// 	}
// 
// 	public boolean isMatch() {
// 		return isMatch;
// 	}
// 
// 	public String getId() {
// 		return id;
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return "MatchResult:"+isMatch+" for " + id;
// 	}
// }


// Path: src/test/java/org/wmaop/aop/matcher/jexl/JexlIDataMatcherTest.java
import static org.junit.Assert.*;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import org.wmaop.aop.matcher.MatchResult;
import com.wm.data.IData;
import com.wm.data.IDataCursor;
import com.wm.data.IDataFactory;
import com.wm.data.IDataUtil;

package org.wmaop.aop.matcher.jexl;





public class JexlIDataMatcherTest {

	@Test
	public void shouldHandleMultipleExpressions() {
		Map<String, String> exprs = new HashMap<>();
		exprs.put("expr1", "foo == 'a'");
		exprs.put("expr2", "foo == 'b'");
		JexlIDataMatcher jidm = new JexlIDataMatcher(exprs);

		IData idata = IDataFactory.create();
		IDataCursor idc = idata.getCursor();
		IDataUtil.put(idc, "foo", "x");
		assertFalse(jidm.match(idata).isMatch());

		IDataUtil.put(idc, "foo", "a");

		MatchResult m = jidm.match(idata);
