public void ShouldBeAbleToAddFunctionToStore() { var luaStore = new LuaStore(); luaStore.AddFunction(null, "FindWindowByName", new string[0]); var libraries = luaStore.GetAllChildren(); var luaObject = libraries.First(); Assert.That(luaObject.Name, Is.EqualTo("FindWindowByName")); Assert.That(luaObject.GetType(), Is.EqualTo(typeof(LuaFunction))); }
public void ShouldBeAbleToAddFunctionToLibrary() { var luaStore = new LuaStore(); luaStore.AddLibrary("Apollo"); luaStore.AddFunction("Apollo", "FindWindowByName", new string[0]); var luaObject = luaStore.GetChild("Apollo").GetChild("FindWindowByName"); Assert.That(luaObject.Name, Is.EqualTo("FindWindowByName")); Assert.That(luaObject.GetType(), Is.EqualTo(typeof(LuaFunction))); }