public void Ensure_That_Remoting_Works() { using (Lua remoting1 = new Lua( )) using (Lua remoting2 = new Lua( )) { remoting1["remote"] = RemoteFunction.Instance; LookupTable <string, Lua> .Store("TestRemoting1", remoting1); LookupTable <string, Lua> .Store("TestRemoting2", remoting2); remoting1.DoString(LuaScripts.GetScriptString("TestRemoting1")); remoting2.DoString(LuaScripts.GetScriptString("TestRemoting2")); AssertOutput(remoting2, "Execute", "TestRemoting1: Value 2\nValue 1"); } }
public void Ensure_That_CLR_Errors_Are_Received( ) { using (Lua err = new Lua( )) { err["throwClrException"] = ThrowClrException.Instance; err.DoString(LuaScripts.GetScriptString("TestExecution")); try { ((LuaFunction)err["ExecuteClr"]).Call( ); Assert.Fail("Test CLR Errors: error not received."); } catch { // Assert.Pass } } }
public void Ensure_That_A_Basic_Script_Runs() { AssertOutput(LuaScripts.GetScriptString("TestExecution"), "Execute", "Executed", "Basic execution."); }
public void TestExecution() { AssertOutput(LuaScripts.GetScriptString("TestExecution"), "Execute", "Executed", "Basic execution."); }