Package org.apache.hivemind.schema.rules

Examples of org.apache.hivemind.schema.rules.InvokeParentRule


    }

    public void testNullParameter() throws Exception
    {
        InvokeParentRule rule = new InvokeParentRule("add");

        MockControl procControl = newControl(SchemaProcessor.class);
        SchemaProcessor proc = (SchemaProcessor) procControl.getMock();

        proc.peek();
        procControl.setReturnValue(null);

        MockControl listControl = newControl(List.class);
        List list = (List) listControl.getMock();

        proc.peek(1);
        procControl.setReturnValue(list);

        list.add(null);
        listControl.setReturnValue(true);

        replayControls();

        rule.begin(proc, null);

        verifyControls();

        resetControls();

        rule = new InvokeParentRule("get");

        proc.peek();
        procControl.setReturnValue(null);

        proc.peek(1);
        procControl.setReturnValue(list);

        replayControls();

        try
        {
            rule.begin(proc, null);

            fail();
        }
        catch (ApplicationRuntimeException e)
        {
View Full Code Here


        verifyControls();
    }

    public void testGetMethod()
    {
        InvokeParentRule r = new InvokeParentRule();

        r.setMethodName("foo");

        assertEquals("foo", r.getMethodName());
    }
View Full Code Here

    {
        _elementModel.addRule(new CreateObjectRule(_className));

        addAttributeRules();

        _elementModel.addRule(new InvokeParentRule(_parentMethodName));
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.schema.rules.InvokeParentRule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.