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 ShouldBeAbleToAddLibraryToStore() { var luaStore = new LuaStore(); luaStore.AddLibrary("Apollo"); var libraries = luaStore.GetAllChildren(); var luaObject = libraries.First(); Assert.That(luaObject.Name, Is.EqualTo("Apollo")); Assert.That(luaObject.GetType(), Is.EqualTo(typeof(LuaLibrary))); }
public void ShouldBeAbleToAddWindowControlToStore() { var luaStore = new LuaStore(); luaStore.AddWindowControl("Window"); var libraries = luaStore.GetAllChildren(); var luaObject = libraries.First(); Assert.That(luaObject.Name, Is.EqualTo("Window")); Assert.That(luaObject.GetType(), Is.EqualTo(typeof(LuaWindowControl))); }
public void ShouldBeAbleToAddObjectToStore() { var luaStore = new LuaStore(); luaStore.AddObject("Challenges"); var libraries = luaStore.GetAllChildren(); var luaObject = libraries.First(); Assert.That(luaObject.Name, Is.EqualTo("Challenges")); Assert.That(luaObject.GetType(), Is.EqualTo(typeof(LuaObject))); }