Examples of InternalContextAdapterImpl


Examples of org.apache.velocity.context.InternalContextAdapterImpl

        {
            // initialize with bad class name
            RuntimeInstance instance = new RuntimeInstance();
            instance.setProperty(RuntimeConstants.EVALUATE_CONTEXT_CLASS, "org.apache");
            instance.init();
            EvaluateContext evc = new EvaluateContext(new InternalContextAdapterImpl(base), instance);
            fail ("Expected an exception");
        }
        catch (Exception e) {}
       
        try
        {
            // initialize with class not implementing Context
            RuntimeInstance instance = new RuntimeInstance();
            instance.setProperty(RuntimeConstants.EVALUATE_CONTEXT_CLASS, org.apache.velocity.test.EvaluateContextTestCase.class.getName());
            instance.init();
            EvaluateContext evc = new EvaluateContext(new InternalContextAdapterImpl(base), instance);
            fail ("Expected an exception");
        }
        catch (Exception e) {}
    }      
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.