changeset 259:142e3c159b8e draft

Added new testGetResourceNPETest case into ScriptContextClassTest.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Wed, 23 Oct 2013 11:00:30 +0200
parents 21d27ab5696b
children 13dbbf4ccc49
files ChangeLog src/org/RhinoTests/ScriptContextClassTest.java
diffstat 2 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Oct 22 09:38:37 2013 +0200
+++ b/ChangeLog	Wed Oct 23 11:00:30 2013 +0200
@@ -1,3 +1,9 @@
+2013-10-23  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/RhinoTests/ScriptContextClassTest.java:
+	Added new testGetResourceNPETest case into
+	ScriptContextClassTest.
+
 2013-10-22  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/org/RhinoTests/BindingsClassTest.java:
--- a/src/org/RhinoTests/ScriptContextClassTest.java	Tue Oct 22 09:38:37 2013 +0200
+++ b/src/org/RhinoTests/ScriptContextClassTest.java	Wed Oct 23 11:00:30 2013 +0200
@@ -1579,6 +1579,19 @@
     }
 
     /**
+     * Test for method javax.script.ScriptContext.getClass().getResourceNPETest()
+     */
+    protected void testGetResourceNPETest() {
+        try {
+            Object resource = this.scriptContextClass.getResource(null);
+            throw new AssertionError("NullPointerException expected!");
+        }
+        catch (NullPointerException e) {
+            //This is OK OK
+        }
+    }
+
+    /**
      * Test for instanceof operator applied to a class javax.script.ScriptContext
      */
     @SuppressWarnings("cast")