Jos� Antonio P�rez Testa wrote:
Can you send the rules and an extract of the code you are using ?

Sure. If you want to actually see the error happen, I can give you instructions to check out my source and run the unit test.


Here is the XML:

<?xml version="1.0" encoding="UTF-8"?>
<virtualmock xmlns="http://www.virtualmock.org/virtualmock.xsd";>
        <excluded-classes>
                <exclusion-pattern>test.*</exclusion-pattern>
        </excluded-classes>
        <rules>
                <rule>
                        
<rule-type>org.virtualmock.rule.AllRecordedCallsMustBeInvokedRule</rule-type>
                </rule>
        </rules>
</virtualmock>

-------------------------------------

Here is the Digester:

vmConfig = new VMConfig();

        digester.push(vmConfig);
        digester.setValidating(validate);

        digester.addCallMethod("virtualmock/excluded-classes/exclusion-pattern",
            "addClassExclusionPattern", 0);

digester.addObjectCreate("virtualmock/rules/rule", RuleConfig.class);
digester.addBeanPropertySetter("virtualmock/rules/rule/rule-type",
"ruleType");
digester.addSetNext("virtualmock/rules/rule", "addRuleConfig", "org.virtualmock.configuration.RuleConfig");


        try {
            digester.parse(inputStream);
        } catch (SAXException saxException) {

-------------------------------------

Here is the Parent object:

public class VMConfig {
    private List classExclusionPatterns = null;
    private List ruleConfigs = null;

    public VMConfig() {
        classExclusionPatterns = new ArrayList();
        ruleConfigs = new ArrayList();
    }

    public List getClassExclusionPatterns() {
        return classExclusionPatterns;
    }

    public List getRuleConfigs() {
        return ruleConfigs;
    }

    public void addClassExclusionPattern(String classExclusionPattern) {
        classExclusionPatterns.add(classExclusionPattern);
    }

    public void addRuleConfig(RuleConfig ruleConfig) {
        ruleConfigs.add(ruleConfig);
    }
}

-------------------------------------

Here is the Child object:

public class RuleConfig {
    private String ruleType = null;

    public void setRuleType(String ruleType) {
        this.ruleType = ruleType;
    }

    public String getRuleType() {
        return ruleType;
    }

    public RuleConfig() {
        super();
    }

}







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to