Exemplo n.º 1
0
        public void ShouldBeAbleToAddMethodToStore()
        {
            var luaStore = new LuaStore();

            luaStore.AddObject("Challenges");
            luaStore.AddMethod("Challenges", "GetId", new string[0]);

            var luaObject = luaStore.GetChild("Challenges").GetChild("GetId");

            Assert.That(luaObject.Name, Is.EqualTo("GetId"));
            Assert.That(luaObject.GetType(), Is.EqualTo(typeof(LuaMethod)));
        }
Exemplo n.º 2
0
        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)));
        }
Exemplo n.º 3
0
        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)));
        }
Exemplo n.º 4
0
        public void ShouldBeAbleToAddMethodToStore()
        {
            var luaStore = new LuaStore();
            luaStore.AddObject("Challenges");
            luaStore.AddMethod("Challenges", "GetId", new string[0]);

            var luaObject = luaStore.GetChild("Challenges").GetChild("GetId");
            Assert.That(luaObject.Name, Is.EqualTo("GetId"));
            Assert.That(luaObject.GetType(), Is.EqualTo(typeof(LuaMethod)));
        }