changeset 289:5b5d51120f71 draft

Added new testGetResourceNPETest case into SimpleScriptContextClassTest.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Thu, 12 Dec 2013 12:05:41 +0100
parents 3acd83bfaf58
children 381ab825c25b
files ChangeLog src/org/RhinoTests/SimpleScriptContextClassTest.java
diffstat 2 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Dec 11 10:50:25 2013 +0100
+++ b/ChangeLog	Thu Dec 12 12:05:41 2013 +0100
@@ -1,3 +1,9 @@
+2013-12-12  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/RhinoTests/SimpleScriptContextClassTest.java:
+	Added new testGetResourceNPETest case into
+	SimpleScriptContextClassTest.
+
 2013-12-11  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/org/RhinoTests/CompilableClassTest.java:
--- a/src/org/RhinoTests/SimpleScriptContextClassTest.java	Wed Dec 11 10:50:25 2013 +0100
+++ b/src/org/RhinoTests/SimpleScriptContextClassTest.java	Thu Dec 12 12:05:41 2013 +0100
@@ -1792,6 +1792,19 @@
     }
 
     /**
+     * Test for method javax.script.SimpleScriptContext.getClass().getResourceAsStreamNPETest()
+     */
+    protected void testGetResourceAsStreamNPETest() {
+        try {
+            Object resource = this.simpleScriptContextClass.getResourceAsStream(null);
+            throw new AssertionError("NullPointerException expected!");
+        }
+        catch (NullPointerException e) {
+            //This is OK OK
+        }
+    }
+
+    /**
      * Test for instanceof operator applied to a class javax.script.SimpleScriptContext
      */
     @SuppressWarnings("cast")