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