コード例 #1
0
        GivenLuaCreateSteamWorkshopItemTaskWithConfigTable_With_PrivateVisibility__OnCreation__ShouldConfigureTask()
        {
            TaskBuilderMock taskBuilderMock = CreateTaskBuilderMock(WorkshopItemVisibility.Private);

            using NLua.Lua luaInterpreter = new NLua.Lua();
            PushVisibilityTable(luaInterpreter);
            LuaTable table = CreateFullConfigurationTableWithoutTags(luaInterpreter, LuaPrivateVisibility);
            LuaCreateSteamWorkshopItemTask sut = new LuaCreateSteamWorkshopItemTask(taskBuilderMock, table);

            taskBuilderMock.Verify();
        }
コード例 #2
0
        GivenLuaCreateSteamWorkshopItemTaskWithConfigTable_With_Tags__OnCreation__ShouldConfigureTaskWithTags()
        {
            TaskBuilderSpy taskBuilderSpy = new TaskBuilderSpy();

            using NLua.Lua luaInterpreter = new NLua.Lua();
            LuaTable table = CreateConfigurationTableWithOnlyTags(luaInterpreter);

            LuaCreateSteamWorkshopItemTask sut = new LuaCreateSteamWorkshopItemTask(taskBuilderSpy, table);

            object actual = taskBuilderSpy["Tags"];

            Assert.IsInstanceOfType(actual, typeof(IEnumerable <string>));
            CollectionAssert.AreEquivalent(ExpectedTags, ((IEnumerable <string>)actual).ToArray());
        }