changeset 245:3c6b83c0c0b6 draft

Added new test testNewInstance into the test suite SimpleBindingsClassTest.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Thu, 03 Oct 2013 10:21:27 +0200
parents 9a5179c62ad8
children 63ab35ca019e
files ChangeLog src/org/RhinoTests/SimpleBindingsClassTest.java
diffstat 2 files changed, 24 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Oct 02 09:45:49 2013 +0200
+++ b/ChangeLog	Thu Oct 03 10:21:27 2013 +0200
@@ -1,3 +1,9 @@
+2013-10-03  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/RhinoTests/SimpleBindingsClassTest.java:
+	Added new test testNewInstance into the test suite
+	SimpleBindingsClassTest.
+
 2013-10-02  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/org/RhinoTests/ScriptEngineFactoryClassTest.java:
--- a/src/org/RhinoTests/SimpleBindingsClassTest.java	Wed Oct 02 09:45:49 2013 +0200
+++ b/src/org/RhinoTests/SimpleBindingsClassTest.java	Thu Oct 03 10:21:27 2013 +0200
@@ -1652,6 +1652,24 @@
     }
 
     /**
+     * Test for method javax.script.SimpleBindings.getClass().newInstance()
+     */
+    protected void testNewInstance() {
+        try {
+            Object o = this.simpleBindingsClass.newInstance();
+        }
+        catch (InstantiationException e) {
+            e.printStackTrace();
+            throw new AssertionError(e.getMessage());
+        }
+        catch (IllegalAccessException e) {
+            e.printStackTrace();
+            throw new AssertionError(e.getMessage());
+        }
+
+    }
+
+    /**
      * Test for instanceof operator applied to a class javax.script.SimpleBindings
      */
     @SuppressWarnings("cast")