Mercurial > hg > rhino-tests
changeset 285:1a02ffbe785b draft
Added new testGetResourceNPETest case into InvocableClassTest.
author | Pavel Tisnovsky <ptisnovs@redhat.com> |
---|---|
date | Fri, 06 Dec 2013 09:49:13 +0100 |
parents | 5e9532790ec8 |
children | cf37f34b3231 |
files | ChangeLog src/org/RhinoTests/InvocableClassTest.java |
diffstat | 2 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Dec 05 09:39:44 2013 +0100 +++ b/ChangeLog Fri Dec 06 09:49:13 2013 +0100 @@ -1,3 +1,9 @@ +2013-12-06 Pavel Tisnovsky <ptisnovs@redhat.com> + + * src/org/RhinoTests/InvocableClassTest.java: + Added new testGetResourceNPETest case into + InvocableClassTest. + 2013-12-05 Pavel Tisnovsky <ptisnovs@redhat.com> * src/org/RhinoTests/CompilableClassTest.java:
--- a/src/org/RhinoTests/InvocableClassTest.java Thu Dec 05 09:39:44 2013 +0100 +++ b/src/org/RhinoTests/InvocableClassTest.java Fri Dec 06 09:49:13 2013 +0100 @@ -1519,6 +1519,19 @@ } /** + * Test for method javax.script.Invocable.getClass().getResourceAsStreamNPETest() + */ + protected void testGetResourceAsStreamNPETest() { + try { + Object resource = this.invocableClass.getResourceAsStream(null); + throw new AssertionError("NullPointerException expected!"); + } + catch (NullPointerException e) { + //This is OK OK + } + } + + /** * Test for instanceof operator applied to a class javax.script.Invocable */ @SuppressWarnings("cast")