changeset 257:1f31c258deff draft

Added new testGetResourceNegativeTest case into SimpleScriptContextClassTest.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Mon, 21 Oct 2013 11:56:47 +0200
parents c476f3ce848f
children 21d27ab5696b
files ChangeLog src/org/RhinoTests/SimpleScriptContextClassTest.java
diffstat 2 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Oct 18 10:32:51 2013 +0200
+++ b/ChangeLog	Mon Oct 21 11:56:47 2013 +0200
@@ -1,3 +1,9 @@
+2013-10-21  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/RhinoTests/SimpleScriptContextClassTest.java:
+	Added new testGetResourceNegativeTest case into
+	SimpleScriptContextClassTest.
+
 2013-10-18  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/org/RhinoTests/AbstractScriptEngineClassTest.java:
--- a/src/org/RhinoTests/SimpleScriptContextClassTest.java	Fri Oct 18 10:32:51 2013 +0200
+++ b/src/org/RhinoTests/SimpleScriptContextClassTest.java	Mon Oct 21 11:56:47 2013 +0200
@@ -1710,6 +1710,19 @@
     }
 
     /**
+     * Test for method javax.script.SimpleScriptContext.getClass().getResourceNPETest()
+     */
+    protected void testGetResourceNPETest() {
+        try {
+            Object resource = this.simpleScriptContextClass.getResource(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")