/hg/rhino-tests: Ten new tests added into SimpleBindingsTest.
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Fri May 23 06:16:13 UTC 2014
changeset 946d61915104 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=946d61915104
author: ptisnovs
date: Fri May 23 08:16:04 2014 +0200
Ten new tests added into SimpleBindingsTest.
diffstat:
ChangeLog | 5 +
src/org/RhinoTests/SimpleBindingsTest.java | 140 +++++++++++++++++++++++++++++
2 files changed, 145 insertions(+), 0 deletions(-)
diffs (162 lines):
diff -r 67c8a396f43f -r 946d61915104 ChangeLog
--- a/ChangeLog Tue May 20 09:12:11 2014 +0200
+++ b/ChangeLog Fri May 23 08:16:04 2014 +0200
@@ -1,3 +1,8 @@
+2014-05-23 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/RhinoTests/SimpleBindingsTest.java:
+ Ten new tests added into SimpleBindingsTest.
+
2014-05-20 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/RhinoTests/SimpleScriptContextTest.java:
diff -r 67c8a396f43f -r 946d61915104 src/org/RhinoTests/SimpleBindingsTest.java
--- a/src/org/RhinoTests/SimpleBindingsTest.java Tue May 20 09:12:11 2014 +0200
+++ b/src/org/RhinoTests/SimpleBindingsTest.java Fri May 23 08:16:04 2014 +0200
@@ -217,6 +217,146 @@
}
/**
+ * Test for method containsKey(String)
+ */
+ protected void testContainsKeyNegative6() throws Exception {
+ SimpleBindings simpleBindings = new SimpleBindings(new HashMap<String, Object>());
+ try {
+ simpleBindings.containsKey(null);
+ }
+ catch (NullPointerException e) {
+ return;
+ }
+ throw new Exception("NPE did not thrown as expected");
+ }
+
+ /**
+ * Test for method containsKey(String)
+ */
+ protected void testContainsKeyNegative7() throws Exception {
+ SimpleBindings simpleBindings = new SimpleBindings(new HashMap<String, Object>());
+ try {
+ simpleBindings.containsKey("");
+ }
+ catch (IllegalArgumentException e) {
+ return;
+ }
+ throw new Exception("IllegalArgumentException did not thrown as expected");
+ }
+
+ /**
+ * Test for method containsKey(String)
+ */
+ protected void testContainsKeyNegative8() throws Exception {
+ SimpleBindings simpleBindings = new SimpleBindings(new HashMap<String, Object>());
+ try {
+ simpleBindings.containsKey(new Integer(42));
+ }
+ catch (ClassCastException e) {
+ return;
+ }
+ throw new Exception("ClassCastException did not thrown as expected");
+ }
+
+ /**
+ * Test for method containsKey(String)
+ */
+ protected void testContainsKeyNegative9() throws Exception {
+ SimpleBindings simpleBindings = new SimpleBindings(new HashMap<String, Object>());
+ try {
+ simpleBindings.containsKey(java.awt.Color.GREEN);
+ }
+ catch (ClassCastException e) {
+ return;
+ }
+ throw new Exception("ClassCastException did not thrown as expected");
+ }
+
+ /**
+ * Test for method containsKey(String)
+ */
+ protected void testContainsKeyNegative10() throws Exception {
+ SimpleBindings simpleBindings = new SimpleBindings(new HashMap<String, Object>());
+ try {
+ simpleBindings.containsKey(this);
+ }
+ catch (ClassCastException e) {
+ return;
+ }
+ throw new Exception("ClassCastException did not thrown as expected");
+ }
+
+ /**
+ * Test for method containsKey(String)
+ */
+ protected void testContainsKeyNegative11() throws Exception {
+ SimpleBindings simpleBindings = new SimpleBindings(new TreeMap<String, Object>());
+ try {
+ simpleBindings.containsKey(null);
+ }
+ catch (NullPointerException e) {
+ return;
+ }
+ throw new Exception("NPE did not thrown as expected");
+ }
+
+ /**
+ * Test for method containsKey(String)
+ */
+ protected void testContainsKeyNegative12() throws Exception {
+ SimpleBindings simpleBindings = new SimpleBindings(new TreeMap<String, Object>());
+ try {
+ simpleBindings.containsKey("");
+ }
+ catch (IllegalArgumentException e) {
+ return;
+ }
+ throw new Exception("IllegalArgumentException did not thrown as expected");
+ }
+
+ /**
+ * Test for method containsKey(String)
+ */
+ protected void testContainsKeyNegative13() throws Exception {
+ SimpleBindings simpleBindings = new SimpleBindings(new TreeMap<String, Object>());
+ try {
+ simpleBindings.containsKey(new Integer(42));
+ }
+ catch (ClassCastException e) {
+ return;
+ }
+ throw new Exception("ClassCastException did not thrown as expected");
+ }
+
+ /**
+ * Test for method containsKey(String)
+ */
+ protected void testContainsKeyNegative14() throws Exception {
+ SimpleBindings simpleBindings = new SimpleBindings(new TreeMap<String, Object>());
+ try {
+ simpleBindings.containsKey(java.awt.Color.GREEN);
+ }
+ catch (ClassCastException e) {
+ return;
+ }
+ throw new Exception("ClassCastException did not thrown as expected");
+ }
+
+ /**
+ * Test for method containsKey(String)
+ */
+ protected void testContainsKeyNegative15() throws Exception {
+ SimpleBindings simpleBindings = new SimpleBindings(new TreeMap<String, Object>());
+ try {
+ simpleBindings.containsKey(this);
+ }
+ catch (ClassCastException e) {
+ return;
+ }
+ throw new Exception("ClassCastException did not thrown as expected");
+ }
+
+ /**
* Entry point to this test case.
*
* @param args parameters passed from command line
More information about the distro-pkg-dev
mailing list