/*
 * BaseElRegexTest.java
 *
 * Created on 2007/03/19, 14:10
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package test.org.itscool.stylist.el;

import junit.framework.TestCase;
import org.itscool.commons.bean.BeanUtilRuntimeException;
import org.itscool.stylist.el.BaseElRegex;
import org.itscool.stylist.el.ElRegexException;

public class BaseElRegexFailTest extends TestCase{
    public void testParseFunction(){
        BaseElRegex regex = new BaseElRegex();
        String el = "mathc.add(1, 2)";
        try{
            String result = regex.parseFunction(el);
            fail("???->"+el);
        }catch(ElRegexException e){
            System.out.println(e.getMessage());
        }
    }
    
    public void testParseFunction2(){
        BaseElRegex regex = new BaseElRegex();
        String el = "mathC.a(1, 2)";
        try{
            String result = regex.parseFunction(el);
            fail("???->"+el);
        }catch(ElRegexException e){
            System.out.println(e.getMessage());
        }
    }
    
    public void testParseFunction3(){
        BaseElRegex regex = new BaseElRegex();
        String el = "mathC(1, 2)";
        String result = regex.parseFunction(el);
        assertEquals(el, "", result);
    }
}
