changeset 261:1ac6ba772ad8 draft

Added new testGetResourceNPETest case into InvocableClassTest.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Fri, 25 Oct 2013 11:05:15 +0200
parents 13dbbf4ccc49
children 328e46cec04a
files ChangeLog src/org/RhinoTests/InvocableClassTest.java
diffstat 2 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Oct 24 09:20:05 2013 +0200
+++ b/ChangeLog	Fri Oct 25 11:05:15 2013 +0200
@@ -1,3 +1,9 @@
+2013-10-25  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/RhinoTests/InvocableClassTest.java:
+	Added new testGetResourceNPETest case into
+	InvocableClassTest.
+
 2013-10-24  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/org/RhinoTests/BindingsClassTest.java:
--- a/src/org/RhinoTests/InvocableClassTest.java	Thu Oct 24 09:20:05 2013 +0200
+++ b/src/org/RhinoTests/InvocableClassTest.java	Fri Oct 25 11:05:15 2013 +0200
@@ -1437,6 +1437,19 @@
     }
 
     /**
+     * Test for method javax.script.Invocable.getClass().getResourceNPETest()
+     */
+    protected void testGetResourceNPETest() {
+        try {
+            Object resource = this.invocableClass.getResource(null);
+            throw new AssertionError("NullPointerException expected!");
+        }
+        catch (NullPointerException e) {
+            //This is OK OK
+        }
+    }
+
+    /**
      * Test for instanceof operator applied to a class javax.script.Invocable
      */
     @SuppressWarnings("cast")