changeset 277:52f3b6653ccd draft

Added new testGetResourceNPETest and testGetResourceNegativeTest cases into SimpleBindingsClassTest.java.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Mon, 25 Nov 2013 09:37:50 +0100
parents d7a085f139ba
children 2c30f6a7c285
files ChangeLog src/org/RhinoTests/SimpleBindingsClassTest.java
diffstat 2 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Nov 22 09:11:17 2013 +0100
+++ b/ChangeLog	Mon Nov 25 09:37:50 2013 +0100
@@ -1,3 +1,10 @@
+2013-11-25  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/RhinoTests/SimpleBindingsClassTest.java:
+	Added new testGetResourceNPETest and
+	testGetResourceNegativeTest cases into
+	SimpleBindingsClassTest.java.
+
 2013-11-22  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/org/RhinoTests/ScriptEngineClassTest.java:
--- a/src/org/RhinoTests/SimpleBindingsClassTest.java	Fri Nov 22 09:11:17 2013 +0100
+++ b/src/org/RhinoTests/SimpleBindingsClassTest.java	Mon Nov 25 09:37:50 2013 +0100
@@ -1670,6 +1670,19 @@
     }
 
     /**
+     * Test for method javax.script.SimpleBindings.getClass().getResourceNPETest()
+     */
+    protected void testGetResourceNPETest() {
+        try {
+            Object resource = this.simpleBindingsClass.getResource(null);
+            throw new AssertionError("NullPointerException expected!");
+        }
+        catch (NullPointerException e) {
+            //This is OK OK
+        }
+    }
+
+    /**
      * Test for instanceof operator applied to a class javax.script.SimpleBindings
      */
     @SuppressWarnings("cast")