Package com.sun.ts.tests.el.common.util
Class ELTestUtil
java.lang.Object
com.sun.ts.tests.el.common.util.ELTestUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkForCNFE
(Object object, String methName, Class<?>[] argTypes, Object[] params) Checks to see if a ClassNotFoundException is thrownstatic void
checkForNPE
(Class<?> clazz, String methName, Class<?>[] argTypes, Object[] params) Checks to see if a NullPointerException is thrown from a given method(methName) from a given Class.static void
checkForNPE
(Object object, String methName, Class<?>[] argTypes, Object[] params) Checks to see if a NullPointerException is thrown from a given method(methName) from a given Class.static void
checkForNPE
(String className, String methName, Class<?>[] argTypes, Object[] params) Checks to see if a NullPointerException is thrown from a given method(methName) from a given Class(className).static void
checkForNSME
(Object object, String methName, Class<?>[] argTypes, Object[] params) Checks to see if a NoSuchMethodException is thrownstatic void
-
Field Details
-
NL
-
PASS
- See Also:
-
FAIL
- See Also:
-
-
Method Details
-
checkForNPE
public static void checkForNPE(String className, String methName, Class<?>[] argTypes, Object[] params) throws Exception Checks to see if a NullPointerException is thrown from a given method(methName) from a given Class(className). use this method for any none Abstract classes you wish to test.- Parameters:
className
- - The Class that has the method under test.methName
- - The method that you want to test.argTypes
- - The type value of the arguments for the method under test.params
- - The parameters you are feeding into the method under test.- Throws:
Exception
-
checkForNPE
public static void checkForNPE(Class<?> clazz, String methName, Class<?>[] argTypes, Object[] params) throws Exception Checks to see if a NullPointerException is thrown from a given method(methName) from a given Class. use this method for any Abstract classes you wish to test. You can pass in the instantiated class that you want to test.- Parameters:
clazz
- - The class you want to test.methName
- - The method that you want to test.argTypes
- - The type value of the arguments for the method under test.params
- - The parameters you are feeding into the method under test.- Throws:
Exception
-
checkForNPE
public static void checkForNPE(Object object, String methName, Class<?>[] argTypes, Object[] params) throws Exception Checks to see if a NullPointerException is thrown from a given method(methName) from a given Class. use this method for any Abstract classes you wish to test. You can pass in the instantiated class that you want to test.- Parameters:
object
- - The Object you want to test.methName
- - The method that you want to test.argTypes
- - The type value of the arguments for the method under test.params
- - The parameters you are feeding into the method under test.- Throws:
Exception
-
checkForCNFE
public static void checkForCNFE(Object object, String methName, Class<?>[] argTypes, Object[] params) throws Exception Checks to see if a ClassNotFoundException is thrown- Parameters:
object
- - The Object you want to test.methName
- - The method that you want to test.argTypes
- - The type value of the arguments for the method under test.params
- - The parameters you are feeding into the method under test.- Throws:
Exception
-
checkForNSME
public static void checkForNSME(Object object, String methName, Class<?>[] argTypes, Object[] params) throws Exception Checks to see if a NoSuchMethodException is thrown- Parameters:
object
- - The Object you want to test.methName
- - The method that you want to test.argTypes
- - The type value of the arguments for the method under test.params
- - The parameters you are feeding into the method under test.- Throws:
Exception
-
printStackTrace
-