changeset 287:78d18ecc53b9 draft

Added new testGetResourceNPETest case into ScriptContextClassTest.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Tue, 10 Dec 2013 12:05:00 +0100
parents cf37f34b3231
children 3acd83bfaf58
files ChangeLog src/org/RhinoTests/ScriptContextClassTest.java
diffstat 2 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Dec 09 10:40:54 2013 +0100
+++ b/ChangeLog	Tue Dec 10 12:05:00 2013 +0100
@@ -1,3 +1,9 @@
+2013-12-10  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/RhinoTests/ScriptContextClassTest.java:
+	Added new testGetResourceNPETest case into
+	ScriptContextClassTest.
+
 2013-12-09  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/org/RhinoTests/ScriptExceptionClassTest.java:
--- a/src/org/RhinoTests/ScriptContextClassTest.java	Mon Dec 09 10:40:54 2013 +0100
+++ b/src/org/RhinoTests/ScriptContextClassTest.java	Tue Dec 10 12:05:00 2013 +0100
@@ -1661,6 +1661,19 @@
     }
 
     /**
+     * Test for method javax.script.ScriptContext.getClass().getResourceAsStreamNPETest()
+     */
+    protected void testGetResourceAsStreamNPETest() {
+        try {
+            Object resource = this.scriptContextClass.getResourceAsStream(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")