public void CheckBoolProp() { TestClass testClass = new TestClass(); testClass.BoolProp = true; string luaScript = "res = dataObject.BoolProp"; LuaScriptingEngine luaScriptingEngine = new LuaScriptingEngine(luaScript); luaScriptingEngine.Execute <bool>(testClass).ShouldBeTrue(); testClass.BoolProp = false; luaScriptingEngine.Execute <bool>(testClass).ShouldBeFalse(); }
public void GlobalSetup() { _luaScriptingEngine = new LuaScriptingEngine("res = dataObject.BoolProp"); _jsScriptingEngine = new JavascriptScriptingEngine("res = dataObject.BoolProp"); _csharpScriptingEngine = new CsharpScriptingEngine("return DataObject.BoolProp;"); var bogus = new Randomizer(); _testClasses = new TestClass[Size]; for (int i = 0; i < Size; i++) { var c = new TestClass(); c.BoolProp = bogus.Bool(); c.DecimalProp = bogus.Decimal(); c.StringProp = bogus.String(10, 200); _testClasses[i] = c; } }