Mercurial > hg > rhino-tests
changeset 336:5a1fcd8c099d draft
Enhancements of various tests in InvocableClassTest.
author | Pavel Tisnovsky <ptisnovs@redhat.com> |
---|---|
date | Wed, 19 Mar 2014 11:01:26 +0100 |
parents | 5ec49b1ba6af |
children | 6c88fa309557 |
files | ChangeLog src/org/RhinoTests/InvocableClassTest.java |
diffstat | 2 files changed, 25 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Mar 18 12:10:50 2014 +0100 +++ b/ChangeLog Wed Mar 19 11:01:26 2014 +0100 @@ -1,3 +1,8 @@ +2014-03-19 Pavel Tisnovsky <ptisnovs@redhat.com> + + * src/org/RhinoTests/InvocableClassTest.java: + Enhancements of various tests in InvocableClassTest. + 2014-03-18 Pavel Tisnovsky <ptisnovs@redhat.com> * src/org/RhinoTests/ScriptContextClassTest.java:
--- a/src/org/RhinoTests/InvocableClassTest.java Tue Mar 18 12:10:50 2014 +0100 +++ b/src/org/RhinoTests/InvocableClassTest.java Wed Mar 19 11:01:26 2014 +0100 @@ -1744,6 +1744,7 @@ catch (Exception e) { // expected exception } + } /** @@ -1760,6 +1761,7 @@ catch (IllegalAccessException e) { // expected exception } + } /** @@ -1919,6 +1921,24 @@ } /** + * Test for method javax.script.Invocable.getClass().getResourceAsStreamPositiveTest() + */ + protected void testGetResourceAsStreamPositiveTest() { + Object stream; + stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/AbstractScriptEngineClassTest.class"); + assertNotNull(stream, "getResourceAsStream(\"/org/RhinoTests/AbstractScriptEngineClassTest.class\") returns null"); + } + + /** + * Test for method javax.script.Invocable.getClass().toString() + */ + protected void testToString() { + String asString; + asString = this.invocableClass.toString(); + assertEquals("interface javax.script.Invocable", asString, "wrong toString() return value"); + } + + /** * Test for instanceof operator applied to a class javax.script.Invocable */ @SuppressWarnings("cast")