Mercurial > hg > rhino-tests
changeset 43:581f4fa2e76f draft
Added five new tests to the test suite src/org/RhinoTests/ScriptExceptionClassTest.java.
author | Pavel Tisnovsky <ptisnovs@redhat.com> |
---|---|
date | Mon, 01 Oct 2012 10:43:13 +0200 |
parents | a3b0d341d76b |
children | fc600356b864 |
files | ChangeLog src/org/RhinoTests/ScriptExceptionClassTest.java |
diffstat | 2 files changed, 60 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Sep 26 11:26:17 2012 +0200 +++ b/ChangeLog Mon Oct 01 10:43:13 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-01 Pavel Tisnovsky <ptisnovs@redhat.com> + + * src/org/RhinoTests/ScriptExceptionClassTest.java: + Added five new tests to this test suite. + 2012-09-26 Pavel Tisnovsky <ptisnovs@redhat.com> * src/org/RhinoTests/AbstractScriptEngineClassTest.java:
--- a/src/org/RhinoTests/ScriptExceptionClassTest.java Wed Sep 26 11:26:17 2012 +0200 +++ b/src/org/RhinoTests/ScriptExceptionClassTest.java Mon Oct 01 10:43:13 2012 +0200 @@ -67,7 +67,7 @@ /** * Object that represents the type of ScriptException. */ - Class<ScriptException> scriptExceptionClass = null; + Class<?> scriptExceptionClass = null; @Override protected void setUp(String[] args) { @@ -138,6 +138,60 @@ } /** + * Test for method javax.script.ScriptException.getClass().isAnnotation() + */ + protected void testIsAnnotation() { + assertFalse(this.scriptExceptionClass.isAnnotation(), + "Method ScriptException.getClass().isAnnotation() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptException.getClass().isAnnotationPresent() + */ + protected void testIsAnnotationPresent() { + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.annotation.Annotation.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.annotation.Annotation.class) returns wrong value"); + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.annotation.Documented.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.annotation.Documented.class) returns wrong value"); + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.annotation.Inherited.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.annotation.Inherited.class) returns wrong value"); + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.annotation.Retention.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.annotation.Retention.class) returns wrong value"); + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.annotation.Target.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.annotation.Target.class) returns wrong value"); + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.Deprecated.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.Deprecated.class) returns wrong value"); + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.Override.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.Override.class) returns wrong value"); + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.SuppressWarnings.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.SuppressWarnings.class) returns wrong value"); + } + + /** + * Test for method javax.script.ScriptException.getClass().isAnonymousClass() + */ + protected void testIsAnonymousClass() { + assertFalse(this.scriptExceptionClass.isAnonymousClass(), + "Method ScriptException.getClass().isAnonymousClass() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptException.getClass().isArray() + */ + protected void testIsArray() { + assertFalse(this.scriptExceptionClass.isArray(), + "Method ScriptException.getClass().isArray() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptException.getClass().isEnum() + */ + protected void testIsEnum() { + assertFalse(this.scriptExceptionClass.isEnum(), + "Method ScriptException.getClass().isEnum() returns wrong value"); + } + + /** * Test for method javax.script.ScriptException.getClass().getInterfaces() */ protected void testGetInterfaces() {