示例#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)));
        }
示例#2
0
        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)));
        }
示例#3
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)));
        }
示例#4
0
        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)));
        }
示例#5
0
        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)));
        }
示例#6
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)));
        }
示例#7
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)));
        }
示例#8
0
        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)));
        }