Beispiel #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)));
        }
Beispiel #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)));
        }
Beispiel #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)));
        }
Beispiel #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)));
        }