Esempio n. 1
0
        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)));
        }
Esempio n. 2
0
        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)));
        }
Esempio n. 3
0
        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)));
        }
Esempio n. 4
0
        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)));
        }