Author: sebb Date: Wed Mar 25 18:44:22 2009 New Revision: 758402 URL: http://svn.apache.org/viewvc?rev=758402&view=rev Log: Use updated TestEngine class
Modified: jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/AbstractScriptEngineTest.java Modified: jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/AbstractScriptEngineTest.java URL: http://svn.apache.org/viewvc/jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/AbstractScriptEngineTest.java?rev=758402&r1=758401&r2=758402&view=diff ============================================================================== --- jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/AbstractScriptEngineTest.java (original) +++ jakarta/bsf/trunk/bsf3/bsf-api/src/test/java/org/apache/bsf/AbstractScriptEngineTest.java Wed Mar 25 18:44:22 2009 @@ -18,53 +18,18 @@ package org.apache.bsf; -import java.io.Reader; - -import javax.script.AbstractScriptEngine; import javax.script.Bindings; import javax.script.ScriptContext; -import javax.script.ScriptEngineFactory; -import javax.script.ScriptException; import javax.script.SimpleBindings; import javax.script.SimpleScriptContext; import junit.framework.TestCase; -public class AbstractScriptEngineTest extends TestCase { - - private class ScriptEngine extends AbstractScriptEngine{ - - public ScriptEngine() { - super(); - } - - public ScriptEngine(Bindings bindings){ - super(bindings); - } +import org.apache.bsf.utils.TestScriptEngine; - public ScriptContext getScriptContext(Bindings bindings){ - return super.getScriptContext(bindings); - } - - public Bindings createBindings() { - return null; - } - - public Object eval(Reader reader, ScriptContext context) throws ScriptException { - return null; - } - - public Object eval(String script, ScriptContext context) throws ScriptException { - return null; - } - - public ScriptEngineFactory getFactory() { - return null; - } - - } +public class AbstractScriptEngineTest extends TestCase { - private final ScriptEngine engine = new ScriptEngine(); + private final TestScriptEngine engine = new TestScriptEngine(); public void testCtor1(){ ScriptContext b = engine.getContext(); @@ -73,12 +38,12 @@ public void testCtor2(){ try { - new ScriptEngine(null); + new TestScriptEngine(null); fail("Should have thrown NPE"); } catch (NullPointerException expected) { } Bindings b = new SimpleBindings(); - new ScriptEngine(b); // should be OK + new TestScriptEngine(b); // should be OK } public void testSetBindings(){ --------------------------------------------------------------------- To unsubscribe, e-mail: bsf-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: bsf-dev-h...@jakarta.apache.org