01: package org.drools.rule.builder.dialect.mvel;
02:
03: import junit.framework.TestCase;
04:
05: public class MVELExprAnalyzerTest extends TestCase {
06:
07: private MVELExprAnalyzer analyzer;
08:
09: protected void setUp() throws Exception {
10: analyzer = new MVELExprAnalyzer();
11: super .setUp();
12: }
13:
14: protected void tearDown() throws Exception {
15: super .tearDown();
16: }
17:
18: public void testDummy() {
19: // Added this so test does prooduce warning in eclipse
20: }
21:
22: public void testGetExpressionIdentifiers() {
23: // try {
24: // String expression = "order.id == 10";
25: // List[] identifiers = analyzer.analyzeExpression( expression, new Set[0] );
26: //
27: // assertEquals( 1, identifiers.length );
28: // assertEquals( 1, identifiers[0].size() );
29: // assertEquals( "order", identifiers[0].get( 0 ));
30: // } catch ( RecognitionException e ) {
31: // e.printStackTrace();
32: // fail( "Unexpected exception: "+e.getMessage());
33: // }
34: }
35:
36: }
|