// Path: core/src/test/java/org/mini2Dx/miniscript/core/dummy/DummyGameScriptingEngine.java
// public class DummyGameScriptingEngine extends GameScriptingEngine {
// 
// 	@Override
// 	protected ScriptExecutorPool<?> createScriptExecutorPool(ClasspathScriptProvider classpathScriptProvider, int poolSize, boolean sandboxing) {
// 		return new DummyScriptExecutorPool(this, poolSize);
// 	}
// 
// 	@Override
// 	public boolean isSandboxingSupported() {
// 		return false;
// 	}
// 
// 	@Override
// 	public boolean isEmbeddedSynchronousScriptSupported() {
// 		return true;
// 	}
// }
// 
// Path: core/src/test/java/org/mini2Dx/miniscript/core/dummy/DummyScript.java
// public class DummyScript {
// 	private final String scriptContent;
// 	private boolean executed = false;
// 	
// 	public DummyScript(String scriptContent) {
// 		this.scriptContent = scriptContent;
// 	}
// 
// 	public boolean isExecuted() {
// 		return executed;
// 	}
// 
// 	public void setExecuted(boolean executed) {
// 		this.executed = executed;
// 	}
// 
// 	public String getScriptContent() {
// 		return scriptContent;
// 	}
// }
// 
// Path: core/src/test/java/org/mini2Dx/miniscript/core/dummy/DummyScriptExecutor.java
// public class DummyScriptExecutor implements ScriptExecutor<DummyScript> {
// 	private final DummyScriptExecutorPool executorPool;
// 	
// 	public DummyScriptExecutor(DummyScriptExecutorPool executorPool) {
// 		this.executorPool = executorPool;
// 	}
// 
// 	@Override
// 	public GameScript<DummyScript> compile(String script) {
// 		return new GlobalGameScript<DummyScript>(new DummyScript(script));
// 	}
// 
// 	@Override
// 	public ScriptExecutionResult execute(int scriptId, GameScript<DummyScript> script, ScriptBindings bindings, boolean returnResult) throws Exception {
// 		script.getScript().setExecuted(true);
// 		return returnResult ? new ScriptExecutionResult(new HashMap<String, Object>()) : null;
// 	}
// 
// 	@Override
// 	public void executeEmbedded(int parentScriptId, int scriptId, GameScript<DummyScript> script, EmbeddedScriptInvoker embeddedScriptInvoker, ScriptBindings bindings) throws Exception {
// 		script.getScript().setExecuted(true);
// 	}
// 
// 	@Override
// 	public void release() {
// 		executorPool.release(this);
// 	}
// 
// }


import org.junit.Assert;
import org.junit.Test;
import org.mini2Dx.miniscript.core.dummy.DummyGameScriptingEngine;
import org.mini2Dx.miniscript.core.dummy.DummyScript;
import org.mini2Dx.miniscript.core.dummy.DummyScriptExecutor;
/**
 * The MIT License (MIT)
 * 
 * Copyright (c) 2016 Thomas Cashman
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package org.mini2Dx.miniscript.core;


/**
 * Unit tests for {@link ScriptExecutionTask}
 */
public class ScriptExecutionTaskTest {

	@Test
	public void testRunExecutesScript() {
		DummyScript script = new DummyScript("");
		ScriptExecutionTask<DummyScript> task = new ScriptExecutionTask<DummyScript>(0, new DummyGameScriptingEngine(),
// Path: core/src/test/java/org/mini2Dx/miniscript/core/dummy/DummyGameScriptingEngine.java
// public class DummyGameScriptingEngine extends GameScriptingEngine {
// 
// 	@Override
// 	protected ScriptExecutorPool<?> createScriptExecutorPool(ClasspathScriptProvider classpathScriptProvider, int poolSize, boolean sandboxing) {
// 		return new DummyScriptExecutorPool(this, poolSize);
// 	}
// 
// 	@Override
// 	public boolean isSandboxingSupported() {
// 		return false;
// 	}
// 
// 	@Override
// 	public boolean isEmbeddedSynchronousScriptSupported() {
// 		return true;
// 	}
// }
// 
// Path: core/src/test/java/org/mini2Dx/miniscript/core/dummy/DummyScript.java
// public class DummyScript {
// 	private final String scriptContent;
// 	private boolean executed = false;
// 	
// 	public DummyScript(String scriptContent) {
// 		this.scriptContent = scriptContent;
// 	}
// 
// 	public boolean isExecuted() {
// 		return executed;
// 	}
// 
// 	public void setExecuted(boolean executed) {
// 		this.executed = executed;
// 	}
// 
// 	public String getScriptContent() {
// 		return scriptContent;
// 	}
// }
// 
// Path: core/src/test/java/org/mini2Dx/miniscript/core/dummy/DummyScriptExecutor.java
// public class DummyScriptExecutor implements ScriptExecutor<DummyScript> {
// 	private final DummyScriptExecutorPool executorPool;
// 	
// 	public DummyScriptExecutor(DummyScriptExecutorPool executorPool) {
// 		this.executorPool = executorPool;
// 	}
// 
// 	@Override
// 	public GameScript<DummyScript> compile(String script) {
// 		return new GlobalGameScript<DummyScript>(new DummyScript(script));
// 	}
// 
// 	@Override
// 	public ScriptExecutionResult execute(int scriptId, GameScript<DummyScript> script, ScriptBindings bindings, boolean returnResult) throws Exception {
// 		script.getScript().setExecuted(true);
// 		return returnResult ? new ScriptExecutionResult(new HashMap<String, Object>()) : null;
// 	}
// 
// 	@Override
// 	public void executeEmbedded(int parentScriptId, int scriptId, GameScript<DummyScript> script, EmbeddedScriptInvoker embeddedScriptInvoker, ScriptBindings bindings) throws Exception {
// 		script.getScript().setExecuted(true);
// 	}
// 
// 	@Override
// 	public void release() {
// 		executorPool.release(this);
// 	}
// 
// }


// Path: core/src/test/java/org/mini2Dx/miniscript/core/ScriptExecutionTaskTest.java
import org.junit.Assert;
import org.junit.Test;
import org.mini2Dx.miniscript.core.dummy.DummyGameScriptingEngine;
import org.mini2Dx.miniscript.core.dummy.DummyScript;
import org.mini2Dx.miniscript.core.dummy.DummyScriptExecutor;

/**
 * The MIT License (MIT)
 * 
 * Copyright (c) 2016 Thomas Cashman
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package org.mini2Dx.miniscript.core;


/**
 * Unit tests for {@link ScriptExecutionTask}
 */
public class ScriptExecutionTaskTest {

	@Test
	public void testRunExecutesScript() {
		DummyScript script = new DummyScript("");
		ScriptExecutionTask<DummyScript> task = new ScriptExecutionTask<DummyScript>(0, new DummyGameScriptingEngine(),
				new DummyScriptExecutor(null), 0, new GlobalGameScript<DummyScript>(script), new ScriptBindings(), null, true);