org.apache.commons.ognl.test
Class OgnlTestCase

java.lang.Object
  extended by org.apache.commons.ognl.test.OgnlTestCase
Direct Known Subclasses:
ArithmeticAndLogicalOperatorsTest, ArrayCreationTest, ArrayElementsTest, ClassMethodTest, CollectionDirectPropertyTest, ConstantTest, ConstantTreeTest, ContextVariableTest, GenericsTest, IndexAccessTest, IndexedPropertyTest, InterfaceInheritanceTest, LambdaExpressionTest, MapCreationTest, MemberAccessTest, MethodTest, MethodWithConversionTest, NestedMethodTest, NullHandlerTest, NullStringCatenationTest, NumberFormatExceptionTest, NumericConversionTest, ObjectIndexedPropertyTest, OperatorTest, PrimitiveArrayTest, PrimitiveNullHandlingTest, PrivateAccessorTest, ProjectionSelectionTest, PropertyArithmeticAndLogicalOperatorsTest, PropertyNotFoundTest, PropertyTest, ProtectedInnerClassTest, QuotingTest, SetterTest, SetterWithConversionTest, ShortCircuitingExpressionTest, SimpleNavigationChainTreeTest, SimplePropertyTreeTest, StaticsAndConstructorsTest

public abstract class OgnlTestCase
extends Object


Field Summary
protected  boolean _compileExpressions
           
protected  OgnlContext _context
           
 
Constructor Summary
OgnlTestCase(String name, Object root, String expressionString, Object expectedResult)
           
OgnlTestCase(String name, Object root, String expressionString, Object expectedResult, Object setValue, boolean hasSetValue, Object expectedAfterSetResult, boolean hasExpectedAfterSetResult)
           
OgnlTestCase(String name, Object root, String expressionString, Object expectedResult, Object setValue, Object expectedAfterSetResult)
           
 
Method Summary
static void assertEquals(Object expected, Object actual)
           
 Object getExpectedResult()
           
 SimpleNode getExpression()
           
 String getExpressionDump(SimpleNode node)
           
 String getExpressionString()
           
static boolean isEqual(Object object1, Object object2)
          Returns true if object1 is equal to object2 in either the sense that they are the same object or, if both are non-null if they are equal in the equals() sense.
 void runTest()
           
 void setUp()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_context

protected OgnlContext _context

_compileExpressions

protected boolean _compileExpressions
Constructor Detail

OgnlTestCase

public OgnlTestCase(String name,
                    Object root,
                    String expressionString,
                    Object expectedResult)

OgnlTestCase

public OgnlTestCase(String name,
                    Object root,
                    String expressionString,
                    Object expectedResult,
                    Object setValue,
                    Object expectedAfterSetResult)

OgnlTestCase

public OgnlTestCase(String name,
                    Object root,
                    String expressionString,
                    Object expectedResult,
                    Object setValue,
                    boolean hasSetValue,
                    Object expectedAfterSetResult,
                    boolean hasExpectedAfterSetResult)
Method Detail

isEqual

public static boolean isEqual(Object object1,
                              Object object2)
Returns true if object1 is equal to object2 in either the sense that they are the same object or, if both are non-null if they are equal in the equals() sense.


getExpressionDump

public String getExpressionDump(SimpleNode node)

getExpressionString

public String getExpressionString()

getExpression

public SimpleNode getExpression()
                         throws Exception
Throws:
Exception

getExpectedResult

public Object getExpectedResult()

assertEquals

public static void assertEquals(Object expected,
                                Object actual)

runTest

public void runTest()
             throws Exception
Throws:
Exception

setUp

public void setUp()


Copyright © 1997-2013 The Apache Software Foundation. All Rights Reserved.